Class: Collie::AST::TypeDeclaration

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

Overview

Type declaration node (%type)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type_tag:, names:, location: nil) ⇒ TypeDeclaration

Returns a new instance of TypeDeclaration.



49
50
51
52
53
# File 'lib/collie/ast.rb', line 49

def initialize(type_tag:, names:, location: nil)
  @type_tag = type_tag
  @names = names
  @location = location
end

Instance Attribute Details

#locationObject

Returns the value of attribute location.



47
48
49
# File 'lib/collie/ast.rb', line 47

def location
  @location
end

#namesObject

Returns the value of attribute names.



47
48
49
# File 'lib/collie/ast.rb', line 47

def names
  @names
end

#type_tagObject

Returns the value of attribute type_tag.



47
48
49
# File 'lib/collie/ast.rb', line 47

def type_tag
  @type_tag
end