Class: Collie::AST::StartDeclaration

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

Overview

Start symbol declaration node (%start)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(symbol:, location: nil) ⇒ StartDeclaration

Returns a new instance of StartDeclaration.



71
72
73
74
# File 'lib/collie/ast.rb', line 71

def initialize(symbol:, location: nil)
  @symbol = symbol
  @location = location
end

Instance Attribute Details

#locationObject

Returns the value of attribute location.



69
70
71
# File 'lib/collie/ast.rb', line 69

def location
  @location
end

#symbolObject

Returns the value of attribute symbol.



69
70
71
# File 'lib/collie/ast.rb', line 69

def symbol
  @symbol
end