Class: Omnium::Parser::AST::Identifier
- Defined in:
- lib/omnium/parser/ast/identifier.rb
Overview
This node represents a variable or an identifier, accepting an ID token.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(token) ⇒ Identifier
constructor
A new instance of Identifier.
Constructor Details
#initialize(token) ⇒ Identifier
Returns a new instance of Identifier.
10 11 12 13 |
# File 'lib/omnium/parser/ast/identifier.rb', line 10 def initialize(token) @token = token # for convenience, though no getter for this @name = token.value end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/omnium/parser/ast/identifier.rb', line 8 def name @name end |