Class: Electr::RootRule
- Defined in:
- lib/electr/parser/rules/root_rule.rb
Instance Method Summary collapse
Methods inherited from BaseRule
Constructor Details
This class inherits a constructor from Electr::BaseRule
Instance Method Details
#apply! ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/electr/parser/rules/root_rule.rb', line 5 def apply! root_node = RootAST.new while more_units? ExpressionRule.new(@units, root_node).apply! end @ast_node.add_child(root_node) end |