gazayas / masamune-ast

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

Implement `Comment#line_number` #67

Closed gazayas closed 1 year ago

gazayas commented 1 year ago

For normal nodes, you can do the following:

node.line_number
node.start_line
node.start_column
# etc...

However, for Comments, you can't do this. You have to get the location first.

comment.location.start_line

I want to be able to do this, just like the other nodes:


comment.line_number