This repository was archived by the owner on Jun 15, 2023. It is now read-only.
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
Making parser consistent with #542 #594
Closed
Description
Follow-up steps for #542 should be taken but I have no idea how to do.
- Motivating example(I’m guessing there would be a few more, I’ve not checked though):
#
Above simple code crashes the parser because parseIdent
calls Parser.next
with Eof
, eventually violates an assertion of res_parser.ml
added by #542. I thought it could be fixed easily by adding another pattern matching for Eof
or substitute Parser.next
with Parser.nextUnsafe
(as far as it does not results another infinite loop), but neither pass the static analyzer. Any solution?
Lines 564 to 586 in 08029af