Class: KPeg::StringEscape::MemoEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/kpeg/string_escape.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ans, pos) ⇒ MemoEntry

Returns a new instance of MemoEntry.



248
249
250
251
252
253
254
# File 'lib/kpeg/string_escape.rb', line 248

def initialize(ans, pos)
  @ans = ans
  @pos = pos
  @result = nil
  @set = false
  @left_rec = false
end

Instance Attribute Details

#ansObject (readonly)

Returns the value of attribute ans.



256
257
258
# File 'lib/kpeg/string_escape.rb', line 256

def ans
  @ans
end

#left_recObject

Returns the value of attribute left_rec.



257
258
259
# File 'lib/kpeg/string_escape.rb', line 257

def left_rec
  @left_rec
end

#posObject (readonly)

Returns the value of attribute pos.



256
257
258
# File 'lib/kpeg/string_escape.rb', line 256

def pos
  @pos
end

#resultObject (readonly)

Returns the value of attribute result.



256
257
258
# File 'lib/kpeg/string_escape.rb', line 256

def result
  @result
end

#setObject (readonly)

Returns the value of attribute set.



256
257
258
# File 'lib/kpeg/string_escape.rb', line 256

def set
  @set
end

Instance Method Details

#move!(ans, pos, result) ⇒ Object



259
260
261
262
263
264
265
# File 'lib/kpeg/string_escape.rb', line 259

def move!(ans, pos, result)
  @ans = ans
  @pos = pos
  @result = result
  @set = true
  @left_rec = false
end