Sha256: 1584a8430012ce434d52fd33ba9bd5e9b5411de0f5eb7eb52df3cc2e9d565429

Contents?: true

Size: 483 Bytes

Versions: 14

Compression:

Stored size: 483 Bytes

Contents

# Mix-in module that provides convenenience methods for
# constructing an AST (Abstract Syntax Tree).
module ASTBuilding
  def return_first_child(_range, _tokens, theChildren)
    return theChildren[0]
  end

  def return_second_child(_range, _tokens, theChildren)
    return theChildren[1]
  end

  def return_last_child(_range, _tokens, theChildren)
    return theChildren[-1]
  end

  def return_epsilon(_range, _tokens, _children)
    return nil
  end
end # module
# End of file

Version data entries

14 entries across 7 versions & 1 rubygems

Version Path
rley-0.5.14 examples/general/calc_iter2/ast_building.rb
rley-0.5.14 examples/general/SRL/lib/ast_building.rb
rley-0.5.13 examples/general/calc_iter2/ast_building.rb
rley-0.5.13 examples/general/SRL/lib/ast_building.rb
rley-0.5.12 examples/general/SRL/lib/ast_building.rb
rley-0.5.12 examples/general/calc_iter2/ast_building.rb
rley-0.5.11 examples/general/calc_iter2/ast_building.rb
rley-0.5.11 examples/general/SRL/lib/ast_building.rb
rley-0.5.10 examples/general/calc_iter2/ast_building.rb
rley-0.5.10 examples/general/SRL/lib/ast_building.rb
rley-0.5.09 examples/general/calc_iter2/ast_building.rb
rley-0.5.09 examples/general/SRL/lib/ast_building.rb
rley-0.5.08 examples/general/SRL/lib/ast_building.rb
rley-0.5.08 examples/general/calc_iter2/ast_building.rb