Class: Rsec::Inner

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

Overview

inner only work for seq

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



85
86
87
88
89
90
91
# File 'lib/rsec/parsers/seq.rb', line 85

def _parse ctx
  res = some._parse ctx
  return INVALID if INVALID[res]
  res.shift
  res.pop
  res
end