Class: Collie::AST::TokenDeclaration
- Inherits:
-
Object
- Object
- Collie::AST::TokenDeclaration
- Defined in:
- lib/collie/ast.rb
Overview
Token declaration node (%token)
Instance Attribute Summary collapse
-
#location ⇒ Object
Returns the value of attribute location.
-
#names ⇒ Object
Returns the value of attribute names.
-
#type_tag ⇒ Object
Returns the value of attribute type_tag.
Instance Method Summary collapse
-
#initialize(names:, type_tag: nil, location: nil) ⇒ TokenDeclaration
constructor
A new instance of TokenDeclaration.
Constructor Details
#initialize(names:, type_tag: nil, location: nil) ⇒ TokenDeclaration
Returns a new instance of TokenDeclaration.
38 39 40 41 42 |
# File 'lib/collie/ast.rb', line 38 def initialize(names:, type_tag: nil, location: nil) @names = names @type_tag = type_tag @location = location end |
Instance Attribute Details
#location ⇒ Object
Returns the value of attribute location.
36 37 38 |
# File 'lib/collie/ast.rb', line 36 def location @location end |
#names ⇒ Object
Returns the value of attribute names.
36 37 38 |
# File 'lib/collie/ast.rb', line 36 def names @names end |
#type_tag ⇒ Object
Returns the value of attribute type_tag.
36 37 38 |
# File 'lib/collie/ast.rb', line 36 def type_tag @type_tag end |