gazayas / masamune-ast

A covenience wrapper around Prism, a Ruby source code parser
MIT License
13 stars 1 forks source link

Add support nodes #35

Closed gazayas closed 1 year ago

gazayas commented 1 year ago

There is no type :comment in the AST from Ripper.sexp, so we pull that data from LexNode instead.

For that reason, I've decided to add @comment_list as opposed to adding Masamune::AbstractSyntaxTree::Comment objects to @data_node_list. It technically already exists as :void_stmt types, so I don't want to double up the objects in the list.

gazayas commented 1 year ago

I'm thinking there are other support nodes we can add too, like Masamune::AbstractSyntaxTree::Block.

gazayas commented 1 year ago

Block added 👍