Class: Potter::AST::Node
- Inherits:
-
Object
show all
- Defined in:
- lib/potter/ast/node.rb
Instance Method Summary
collapse
Instance Method Details
#eql?(o) ⇒ Boolean
13
14
15
|
# File 'lib/potter/ast/node.rb', line 13
def eql?(o)
hash == o.hash
end
|
#hash ⇒ Object
11
|
# File 'lib/potter/ast/node.rb', line 11
def hash = [self.class, *instance_variable_values].hash
|
#name ⇒ Object
5
|
# File 'lib/potter/ast/node.rb', line 5
def name = NAME
|
#symbol ⇒ Object
4
|
# File 'lib/potter/ast/node.rb', line 4
def symbol = SYMBOL
|
#visit(visitor) ⇒ Object
7
8
9
|
# File 'lib/potter/ast/node.rb', line 7
def visit(visitor)
visitor.try(name, self)
end
|