Class: Predicator::AST::Node
- Inherits:
-
Object
- Object
- Predicator::AST::Node
show all
- Includes:
- Enumerable
- Defined in:
- lib/predicator/ast.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(left) ⇒ Node
Returns a new instance of Node.
8
9
10
|
# File 'lib/predicator/ast.rb', line 8
def initialize left
@left = left
end
|
Instance Attribute Details
#left ⇒ Object
Returns the value of attribute left.
6
7
8
|
# File 'lib/predicator/ast.rb', line 6
def left
@left
end
|
Instance Method Details
#each(&block) ⇒ Object
12
13
14
|
# File 'lib/predicator/ast.rb', line 12
def each &block
Visitors::Each.new(block).accept self
end
|
#literal? ⇒ Boolean
33
|
# File 'lib/predicator/ast.rb', line 33
def literal?; false; end
|
#to_instructions ⇒ Object
#type ⇒ Object
28
29
30
|
# File 'lib/predicator/ast.rb', line 28
def type
raise NotImplementedError
end
|
#variable? ⇒ Boolean
32
|
# File 'lib/predicator/ast.rb', line 32
def variable?; false; end
|