Class: Waxeye::AST

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, children, pos) ⇒ AST

Returns a new instance of AST.



68
69
70
71
72
# File 'lib/waxeye.rb', line 68

def initialize(type, children, pos)
  @type = type
  @children = children
  @pos = pos
end

Instance Attribute Details

#childrenObject (readonly)

Returns the value of attribute children.



67
68
69
# File 'lib/waxeye.rb', line 67

def children
  @children
end

#posObject (readonly)

Returns the value of attribute pos.



67
68
69
# File 'lib/waxeye.rb', line 67

def pos
  @pos
end

#typeObject (readonly)

Returns the value of attribute type.



67
68
69
# File 'lib/waxeye.rb', line 67

def type
  @type
end

Instance Method Details

#displayObject



79
80
81
# File 'lib/waxeye.rb', line 79

def display()
  display_iter(self, [0])
end

#display_sexprObject



74
75
76
77
# File 'lib/waxeye.rb', line 74

def display_sexpr()
  display_sexpr_iter(self)
  print "\n"
end