Class: Ikra::AST::Node

Inherits:
Object show all
Defined in:
lib/ast/nodes.rb,
lib/ast/printer.rb,
lib/ast/visitor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parentObject

Returns the value of attribute parent.



4
5
6
# File 'lib/ast/nodes.rb', line 4

def parent
  @parent
end

Instance Method Details

#==(other) ⇒ Object



10
11
12
# File 'lib/ast/nodes.rb', line 10

def ==(other)
    return self.class == other.class
end

#accept(visitor) ⇒ Object



6
7
8
# File 'lib/ast/visitor.rb', line 6

def accept(visitor)
    return visitor.visit_node(self)
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/ast/nodes.rb', line 6

def eql?(other)
    return self == other
end

#hashObject



14
15
16
# File 'lib/ast/nodes.rb', line 14

def hash
    return 1231
end

#to_sObject



4
5
6
# File 'lib/ast/printer.rb', line 4

def to_s
    return "[Node]"
end