Skip to content

Instantly share code, notes, and snippets.

@colorbox
Created May 16, 2018 14:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save colorbox/06b7d637809940dc6d5dc9db2d4f4752 to your computer and use it in GitHub Desktop.
require 'parser/current'
str = <<-FOO
def hoge
# this is comment
pp"this is test"
end
FOO
Parser::CurrentRuby.parse_with_comments str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment