Class: Loxxy::Ast::LoxNode
- Inherits:
-
Object
- Object
- Loxxy::Ast::LoxNode
- Defined in:
- lib/loxxy/ast/lox_node.rb
Direct Known Subclasses
LoxCompoundExpr, LoxFunStmt, LoxGetExpr, LoxLiteralExpr, LoxNoopExpr, LoxSuperExpr, LoxThisExpr, LoxVariableExpr
Instance Attribute Summary collapse
-
#position ⇒ Object
readonly
return [Rley::Lexical::Position] Position of the entry in the input stream.
Instance Method Summary collapse
-
#accept(_visitor) ⇒ Object
Abstract method.
-
#done! ⇒ Object
Notification that the parsing was successfully completed.
-
#initialize(aPosition) ⇒ LoxNode
constructor
A new instance of LoxNode.
Constructor Details
#initialize(aPosition) ⇒ LoxNode
10 11 12 |
# File 'lib/loxxy/ast/lox_node.rb', line 10 def initialize(aPosition) @position = aPosition end |
Instance Attribute Details
#position ⇒ Object (readonly)
return [Rley::Lexical::Position] Position of the entry in the input stream.
7 8 9 |
# File 'lib/loxxy/ast/lox_node.rb', line 7 def position @position end |
Instance Method Details
#accept(_visitor) ⇒ Object
Abstract method. Part of the 'visitee' role in Visitor design pattern.
22 23 24 |
# File 'lib/loxxy/ast/lox_node.rb', line 22 def accept(_visitor) raise NotImplementedError end |
#done! ⇒ Object
Notification that the parsing was successfully completed
15 16 17 |
# File 'lib/loxxy/ast/lox_node.rb', line 15 def done! # Default: do nothing ... end |