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
-
#initialize(type, children, pos) ⇒ AST
constructor
A new instance of AST.
- #to_s ⇒ Object
- #to_s_sexpr ⇒ Object
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
#to_s ⇒ Object
80 81 82 83 84 |
# File 'lib/waxeye.rb', line 80 def to_s() acc = [] to_s_iter(self, [0], acc) acc.to_s end |
#to_s_sexpr ⇒ Object
74 75 76 77 78 |
# File 'lib/waxeye.rb', line 74 def to_s_sexpr() acc = [] display_sexpr_iter(self, acc) acc.to_s end |