Class: SrlRuby::SrlToken
- Inherits:
-
Rley::Lexical::Token
- Object
- Rley::Lexical::Token
- SrlRuby::SrlToken
- 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
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
-
#initialize(theLexeme, aTerminal, aPosition) ⇒ SrlToken
constructor
A new instance of SrlToken.
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
#position ⇒ Object (readonly)
Returns the value of attribute position.
14 15 16 |
# File 'lib/srl_ruby/srl_token.rb', line 14 def position @position end |