Class: Ibex::BisonImport::Tokenizer::Token
- Inherits:
-
Object
- Object
- Ibex::BisonImport::Tokenizer::Token
- Defined in:
- lib/ibex/bison_import/tokenizer.rb
Overview
One structural token with a byte-oriented source position.
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
: Integer.
-
#line ⇒ Object
readonly
: Integer.
-
#type ⇒ Object
readonly
: Symbol.
-
#value ⇒ Object
readonly
: String.
Instance Method Summary collapse
-
#initialize(type:, value:, line:, column:) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(type:, value:, line:, column:) ⇒ Token
Returns a new instance of Token.
16 17 18 19 20 21 22 |
# File 'lib/ibex/bison_import/tokenizer.rb', line 16 def initialize(type:, value:, line:, column:) @type = type @value = value.freeze @line = line @column = column freeze end |
Instance Attribute Details
#column ⇒ Object (readonly)
: Integer
13 14 15 |
# File 'lib/ibex/bison_import/tokenizer.rb', line 13 def column @column end |
#line ⇒ Object (readonly)
: Integer
12 13 14 |
# File 'lib/ibex/bison_import/tokenizer.rb', line 12 def line @line end |
#type ⇒ Object (readonly)
: Symbol
10 11 12 |
# File 'lib/ibex/bison_import/tokenizer.rb', line 10 def type @type end |
#value ⇒ Object (readonly)
: String
11 12 13 |
# File 'lib/ibex/bison_import/tokenizer.rb', line 11 def value @value end |