Class: Eqn::Terminal::Op

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/eqn/terminal.rb

Direct Known Subclasses

LeftAssociativeOp, RightAssociativeOp

Defined Under Namespace

Classes: LeftAssociativeOp, RightAssociativeOp

Instance Method Summary collapse

Instance Method Details

#left_associative?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/eqn/terminal.rb', line 29

def left_associative?
  is_a? LeftAssociativeOp
end

#valueObject



33
34
35
# File 'lib/eqn/terminal.rb', line 33

def value
  text_value == '^' ? :** : text_value.intern
end