Class: Treetop::Runtime::SyntaxNode

Inherits:
Object
  • Object
show all
Defined in:
lib/precedent/grammar/node_patch.rb

Instance Method Summary collapse

Instance Method Details

#buildObject

Convenience pass-through method for building ASTs. Intersitial Treetop nodes can just label subrules their “content” and pass through during AST construction.



7
8
9
# File 'lib/precedent/grammar/node_patch.rb', line 7

def build
  elements.map(&:build) if elements
end