Ruby syntaxtree: Difference between revisions
From wikinotes
No edit summary |
|||
Line 8: | Line 8: | ||
|- | |- | ||
| github || https://github.com/ruby-syntax-tree/syntax_tree | | github || https://github.com/ruby-syntax-tree/syntax_tree | ||
|- | |||
| api docs (and avail AST nodes!) || https://ruby-syntax-tree.github.io/syntax_tree/table_of_contents.html#classes | |||
|- | |- | ||
|} | |} |
Latest revision as of 00:25, 1 February 2024
a very fast ruby ast
node-types all defined within node.rb
Documentation
github https://github.com/ruby-syntax-tree/syntax_tree api docs (and avail AST nodes!) https://ruby-syntax-tree.github.io/syntax_tree/table_of_contents.html#classes
stree match /some/file.rb # generate matcher code
stree search 'VarRef' /some/file.rb # search for code
stree search 'VarRef[value: Const[value: "MyModule"]]' **/*.rb
stree search 'ConstPathRef[VarRef[value: Const[value: "MyModule"]],Const[value: "MyClass"]]' **/*.rb