Class: Ronin::Code::SQL::BinaryExpr
- Defined in:
- lib/ronin/code/sql/binary_expr.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Left-hand side.
-
#op ⇒ Object
readonly
Operator.
-
#right ⇒ Object
readonly
Right-hand side.
Instance Method Summary collapse
- #emit ⇒ Object
-
#initialize(op, left, right) ⇒ BinaryExpr
constructor
A new instance of BinaryExpr.
Methods inherited from Expr
Constructor Details
#initialize(op, left, right) ⇒ BinaryExpr
Returns a new instance of BinaryExpr.
38 39 40 41 42 |
# File 'lib/ronin/code/sql/binary_expr.rb', line 38 def initialize(op,left,right) @op = op @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Left-hand side
33 34 35 |
# File 'lib/ronin/code/sql/binary_expr.rb', line 33 def left @left end |
#op ⇒ Object (readonly)
Operator
30 31 32 |
# File 'lib/ronin/code/sql/binary_expr.rb', line 30 def op @op end |
#right ⇒ Object (readonly)
Right-hand side
36 37 38 |
# File 'lib/ronin/code/sql/binary_expr.rb', line 36 def right @right end |
Instance Method Details
#emit ⇒ Object
44 45 46 |
# File 'lib/ronin/code/sql/binary_expr.rb', line 44 def emit emit_value(@left) + emit_token(@op) + emit_value(@right) end |