Class: Ibex::BisonImport::Tokenizer::Token
- Inherits:
-
Object
- Object
- Ibex::BisonImport::Tokenizer::Token
- Defined in:
- lib/ibex/bison_import/tokenizer.rb,
sig/ibex/bison_import/tokenizer.rbs
Overview
One structural token with a byte-oriented source position.
Instance Attribute Summary collapse
- #column ⇒ Integer readonly
- #line ⇒ Integer readonly
- #type ⇒ Symbol readonly
- #value ⇒ String readonly
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 ⇒ Integer (readonly)
13 14 15 |
# File 'lib/ibex/bison_import/tokenizer.rb', line 13 def column @column end |
#line ⇒ Integer (readonly)
12 13 14 |
# File 'lib/ibex/bison_import/tokenizer.rb', line 12 def line @line end |
#type ⇒ Symbol (readonly)
10 11 12 |
# File 'lib/ibex/bison_import/tokenizer.rb', line 10 def type @type end |
#value ⇒ String (readonly)
11 12 13 |
# File 'lib/ibex/bison_import/tokenizer.rb', line 11 def value @value end |