Class: Rsec::Eof

Inherits:
Unary
  • Object
show all
Defined in:
lib/rsec/parsers/misc.rb

Overview

should be end-of-file after parsing FIXME seems parser keeps a state when using parse!, see nasm manual parse

Instance Attribute Summary

Attributes inherited from Unary

#some

Attributes included from Parser

#name

Instance Method Summary collapse

Methods included from Parser

#&, #*, #<<, #>>, #^, #cached, #eof, #fail, #inspect, #join, #map, #maybe, #parse, #parse!, #star, #|

Instance Method Details

#_parse(ctx) ⇒ Object



119
120
121
122
# File 'lib/rsec/parsers/misc.rb', line 119

def _parse ctx
  ret = some()._parse ctx
  ctx.eos? ? ret : INVALID
end