Class: Collie::AST::TokenDeclaration

Inherits:
Object
  • Object
show all
Defined in:
lib/collie/ast.rb

Overview

Token declaration node (%token)

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#locationObject

Returns the value of attribute location.



36
37
38
# File 'lib/collie/ast.rb', line 36

def location
  @location
end

#namesObject

Returns the value of attribute names.



36
37
38
# File 'lib/collie/ast.rb', line 36

def names
  @names
end

#type_tagObject

Returns the value of attribute type_tag.



36
37
38
# File 'lib/collie/ast.rb', line 36

def type_tag
  @type_tag
end