Class: Estreet::LogicalExpression

Inherits:
BinaryExpression show all
Defined in:
lib/estreet/binary_expression.rb

Instance Attribute Summary

Attributes inherited from Node

#source_location

Instance Method Summary collapse

Methods inherited from BinaryExpression

#attributes

Methods inherited from Expression

#[], #call, coerce, #property, #to_expression, #to_statement

Methods inherited from Node

#as_json, #loc, #type

Constructor Details

#initialize(operator, left, right) ⇒ LogicalExpression

Returns a new instance of LogicalExpression.



21
22
23
24
25
26
27
# File 'lib/estreet/binary_expression.rb', line 21

def initialize(operator, left, right)
  Estreet.assert_valid_operator(LOGICAL_OPERATORS, operator)

  @operator = operator
  @left     = left.to_expression
  @right    = right.to_expression
end