Method: Fast.ast
- Defined in:
- lib/fast.rb
.ast(content, buffer_name: '(string)') ⇒ Fast::Node
Returns from the parsed content.
137 138 139 140 141 |
# File 'lib/fast.rb', line 137 def ast(content, buffer_name: '(string)') buffer = Parser::Source::Buffer.new(buffer_name) buffer.source = content Parser::CurrentRuby.new(builder_for(buffer_name)).parse(buffer) end |