Class: Waxeye::AST
- Inherits:
-
Object
- Object
- Waxeye::AST
- Defined in:
- lib/waxeye.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #display ⇒ Object
- #display_sexpr ⇒ Object
-
#initialize(type, children, pos) ⇒ AST
constructor
A new instance of AST.
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
#children ⇒ Object (readonly)
Returns the value of attribute children.
67 68 69 |
# File 'lib/waxeye.rb', line 67 def children @children end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
67 68 69 |
# File 'lib/waxeye.rb', line 67 def pos @pos end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
67 68 69 |
# File 'lib/waxeye.rb', line 67 def type @type end |
Instance Method Details
#display ⇒ Object
79 80 81 |
# File 'lib/waxeye.rb', line 79 def display() display_iter(self, [0]) end |
#display_sexpr ⇒ Object
74 75 76 77 |
# File 'lib/waxeye.rb', line 74 def display_sexpr() display_sexpr_iter(self) print "\n" end |