Class: Rubycc::Front::AST::Binary
- Inherits:
-
Data
- Object
- Data
- Rubycc::Front::AST::Binary
- Defined in:
- lib/rubycc/front/ast.rb
Overview
Binary operation. op is one of :add, :sub, :mul, :div, :mod
(arithmetic), :and, :or, :xor (bitwise), :shl, :shr (shifts) or
:eq, :ne, :lt, :le, :gt, :ge (comparisons yielding int 0/1). The unary
bitwise-not "~x" has no op of its own: the parser desugars it to the
Binary "x ^ -1", so it reaches the generator as an ordinary :xor.
Instance Attribute Summary collapse
-
#lhs ⇒ Object
readonly
Returns the value of attribute lhs.
-
#op ⇒ Object
readonly
Returns the value of attribute op.
-
#rhs ⇒ Object
readonly
Returns the value of attribute rhs.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Attribute Details
#lhs ⇒ Object (readonly)
Returns the value of attribute lhs
35 36 37 |
# File 'lib/rubycc/front/ast.rb', line 35 def lhs @lhs end |
#op ⇒ Object (readonly)
Returns the value of attribute op
35 36 37 |
# File 'lib/rubycc/front/ast.rb', line 35 def op @op end |
#rhs ⇒ Object (readonly)
Returns the value of attribute rhs
35 36 37 |
# File 'lib/rubycc/front/ast.rb', line 35 def rhs @rhs end |
#token ⇒ Object (readonly)
Returns the value of attribute token
35 36 37 |
# File 'lib/rubycc/front/ast.rb', line 35 def token @token end |