Class: Electr::RootRule
- Defined in:
- lib/electr/parser/rules/root_rule.rb
Overview
Starting point for the rules.
TODO Is this really needed?
Instance Method Summary collapse
Methods inherited from BaseRule
Constructor Details
This class inherits a constructor from Electr::BaseRule
Instance Method Details
#apply ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/electr/parser/rules/root_rule.rb', line 8 def apply root_node = RootAST.new while more_units? ExpressionRule.new(@units, root_node).apply end @ast_node.add_child(root_node) end |