Class: MilkTea::Lexer::StringSegment

Inherits:
Data
  • Object
show all
Defined in:
lib/milk_tea/core/lexer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(next_index:, value:, recovered: false) ⇒ StringSegment

Returns a new instance of StringSegment.



35
36
37
# File 'lib/milk_tea/core/lexer.rb', line 35

def initialize(next_index:, value:, recovered: false)
  super(next_index:, value:, recovered:)
end

Instance Attribute Details

#next_indexObject (readonly)

Returns the value of attribute next_index

Returns:

  • (Object)

    the current value of next_index



34
35
36
# File 'lib/milk_tea/core/lexer.rb', line 34

def next_index
  @next_index
end

#recoveredObject (readonly)

Returns the value of attribute recovered

Returns:

  • (Object)

    the current value of recovered



34
35
36
# File 'lib/milk_tea/core/lexer.rb', line 34

def recovered
  @recovered
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



34
35
36
# File 'lib/milk_tea/core/lexer.rb', line 34

def value
  @value
end