fix: sepBy

If parser consumed something, keep error.
This commit is contained in:
Leonardo de Moura 2020-02-21 11:43:45 -08:00
parent 9694102b3e
commit bb0bfb5742

View file

@ -444,7 +444,8 @@ fun c s =>
let pos := s.pos;
let s := p c s;
if s.hasError then
if pOpt then
if s.pos > pos then s
else if pOpt then
let s := s.restore sz pos;
if s.stackSize - iniSz == 2 && unboxSingleton then
s.popSyntax