Class: Romanesco::ExpressionTreeBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/romanesco/expression_tree_builder.rb

Instance Method Summary collapse

Instance Method Details

#build_tree(expression, elements) ⇒ Object



7
8
9
10
11
12
# File 'lib/romanesco/expression_tree_builder.rb', line 7

def build_tree(expression, elements)
  first_state = StateZero
  new_tree = ExpressionTree.new(expression)
  first_state.transition(new_tree, elements)
  new_tree
end