Class: SrlRuby::SrlToken

Inherits:
Rley::Lexical::Token
  • Object
show all
Defined in:
lib/srl_ruby/srl_token.rb

Overview

Specialization of Token class. It stores the position in (line, row) of the token

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(theLexeme, aTerminal, aPosition) ⇒ SrlToken

Returns a new instance of SrlToken.



16
17
18
19
# File 'lib/srl_ruby/srl_token.rb', line 16

def initialize(theLexeme, aTerminal, aPosition)
  super(theLexeme, aTerminal)
  @position = aPosition
end

Instance Attribute Details

#positionObject (readonly)

Returns the value of attribute position.



14
15
16
# File 'lib/srl_ruby/srl_token.rb', line 14

def position
  @position
end