Class: Ibex::Runtime::RepairInput

Inherits:
Object
  • Object
show all
Defined in:
lib/ibex/runtime/repair.rb,
sig/ibex/runtime/repair.rbs

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

Parameters:

  • token_id: (Integer)
  • token_name: (String)
  • value: (Object, nil)
  • location: (Object, nil)


132
133
134
135
136
137
138
# File 'lib/ibex/runtime/repair.rb', line 132

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?

Returns:

  • (Object, nil)


129
130
131
# File 'lib/ibex/runtime/repair.rb', line 129

def location
  @location
end

#token_idInteger (readonly)

Signature:

  • Integer

Returns:

  • (Integer)


126
127
128
# File 'lib/ibex/runtime/repair.rb', line 126

def token_id
  @token_id
end

#token_nameString (readonly)

Signature:

  • String

Returns:

  • (String)


127
128
129
# File 'lib/ibex/runtime/repair.rb', line 127

def token_name
  @token_name
end

#valueObject? (readonly)

Signature:

  • Object?

Returns:

  • (Object, nil)


128
129
130
# File 'lib/ibex/runtime/repair.rb', line 128

def value
  @value
end

Instance Method Details

#eof?Boolean

RBS:

  • () -> bool

Returns:

  • (Boolean)


141
# File 'lib/ibex/runtime/repair.rb', line 141

def eof? = @token_id.zero?