Class: Ibex::BisonImport::Tokenizer::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/ibex/bison_import/tokenizer.rb

Overview

One structural token with a byte-oriented source position.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#columnObject (readonly)

: Integer



13
14
15
# File 'lib/ibex/bison_import/tokenizer.rb', line 13

def column
  @column
end

#lineObject (readonly)

: Integer



12
13
14
# File 'lib/ibex/bison_import/tokenizer.rb', line 12

def line
  @line
end

#typeObject (readonly)

: Symbol



10
11
12
# File 'lib/ibex/bison_import/tokenizer.rb', line 10

def type
  @type
end

#valueObject (readonly)

: String



11
12
13
# File 'lib/ibex/bison_import/tokenizer.rb', line 11

def value
  @value
end