Class: Ibex::Runtime::RepairInput

Inherits:
Object
  • Object
show all
Defined in:
lib/json5/generated_parser.rb

Overview

Internal normalized input record retained while repair looks ahead.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token_id:, token_name:, value:, location:) ⇒ RepairInput

Returns a new instance of RepairInput.

RBS:

  • (token_id: Integer, token_name: String, value: Object?, location: Object?) -> void



4599
4600
4601
4602
4603
4604
4605
# File 'lib/json5/generated_parser.rb', line 4599

def initialize(token_id:, token_name:, value:, location:)
  @token_id = token_id
  @token_name = token_name.dup.freeze
  @value = value
  @location = location
  freeze
end

Instance Attribute Details

#locationObject (readonly)

Signature:

  • Object?



4596
4597
4598
# File 'lib/json5/generated_parser.rb', line 4596

def location
  @location
end

#token_idObject (readonly)

Signature:

  • Integer



4593
4594
4595
# File 'lib/json5/generated_parser.rb', line 4593

def token_id
  @token_id
end

#token_nameObject (readonly)

Signature:

  • String



4594
4595
4596
# File 'lib/json5/generated_parser.rb', line 4594

def token_name
  @token_name
end

#valueObject (readonly)

Signature:

  • Object?



4595
4596
4597
# File 'lib/json5/generated_parser.rb', line 4595

def value
  @value
end

Instance Method Details

#eof?Boolean

RBS:

  • () -> bool

Returns:

  • (Boolean)


4608
# File 'lib/json5/generated_parser.rb', line 4608

def eof? = @token_id.zero?