Ruby ffast: Difference between revisions

From wikinotes
(Created page with "A library and cli tool for searching/matching nodes within ruby's AST. = Documentation = <blockquote> {| class="wikitable" |- | github || https://github.com/jonatas/fast |- |} </blockquote><!-- Documentation --> = Install = <blockquote> <source lang="bash"> gem install ffast </source> </blockquote><!-- install --> = Usage = <blockquote> <source lang="bash"> fast '(const _ _)' some/file.rb </source> </blockquote><!-- usage -->")
 
Line 20: Line 20:
<blockquote>
<blockquote>
<source lang="bash">
<source lang="bash">
fast '(const _ _)' some/file.rb
fast --ast some/file.rb            # show ast
fast '(const _ _)' some/file.rb    # find matching in some/file.rb
</source>
</source>
</blockquote><!-- usage -->
</blockquote><!-- usage -->

Revision as of 15:53, 1 February 2024

A library and cli tool for searching/matching nodes within ruby's AST.

Documentation

github https://github.com/jonatas/fast

Install

gem install ffast

Usage

fast --ast some/file.rb            # show ast
fast '(const _ _)' some/file.rb    # find matching in some/file.rb