Class: Melbourne::AST::And

Inherits:
Node
  • Object
show all
Defined in:
lib/melbourne/ast/operators.rb

Overview

The and operator as in:

a and b

Direct Known Subclasses

Or

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, left, right) ⇒ And

Returns a new instance of And.



19
20
21
22
23
# File 'lib/melbourne/ast/operators.rb', line 19

def initialize(line, left, right)
  @line = line
  @left = left
  @right = right
end

Instance Attribute Details

#leftObject

The left-side expression of the and operator



13
14
15
# File 'lib/melbourne/ast/operators.rb', line 13

def left
  @left
end

#rightObject

The right-side expression of the and operator



17
18
19
# File 'lib/melbourne/ast/operators.rb', line 17

def right
  @right
end