Class: Logicality::Parser::Ast::Node
- Inherits:
-
Object
- Object
- Logicality::Parser::Ast::Node
- Defined in:
- lib/logicality/parser/ast/node.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token) ⇒ Node
constructor
A new instance of Node.
- #to_s ⇒ Object
Constructor Details
#initialize(token) ⇒ Node
Returns a new instance of Node.
15 16 17 18 |
# File 'lib/logicality/parser/ast/node.rb', line 15 def initialize(token) @token = token @name = '' end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
13 14 15 |
# File 'lib/logicality/parser/ast/node.rb', line 13 def name @name end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
13 14 15 |
# File 'lib/logicality/parser/ast/node.rb', line 13 def token @token end |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/logicality/parser/ast/node.rb', line 20 def to_s "AstNode: #{self.class.name}::#{token}" end |