seattlerb / ruby_parser

ruby_parser is a ruby parser written in pure ruby. It outputs s-expressions which can be manipulated and converted back to ruby via the ruby2ruby gem.
http://www.zenspider.com/projects/ruby_parser.html
476 stars 100 forks source link

Parsing comments #310

Closed jrperron88-zz closed 3 years ago

jrperron88-zz commented 4 years ago

Has there been any thought into being able to keep comments in the parsing? Working on a project now that this is almost perfect for, but we need to preserve comments. From the documentation it sounds like you are supposed to support class/module/def/defn comments, but That hasn't worked for me, or any comments.

zenspider commented 3 years ago

I don't think it'll ever be good at keeping all comments... but it definitely does (did?) work for class/module/defs/defn... Can you show me something not working for you?

zenspider commented 3 years ago

no response... closing