Class: Baba::Expr::Logical

Inherits:
Object
  • Object
show all
Defined in:
lib/baba/expr.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(left, operator, right) ⇒ Logical

Returns a new instance of Logical.

[View source]

90
91
92
# File 'lib/baba/expr.rb', line 90

def initialize(left, operator, right)
  @left = left; @operator = operator; @right = right
end

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.


88
89
90
# File 'lib/baba/expr.rb', line 88

def left
  @left
end

#operatorObject (readonly)

Returns the value of attribute operator.


88
89
90
# File 'lib/baba/expr.rb', line 88

def operator
  @operator
end

#rightObject (readonly)

Returns the value of attribute right.


88
89
90
# File 'lib/baba/expr.rb', line 88

def right
  @right
end

Instance Method Details

#accept(visitor) ⇒ Object

[View source]

94
95
96
# File 'lib/baba/expr.rb', line 94

def accept(visitor)
  visitor.visit_logical_expr(self)
end