Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit eeaa86f

Browse files
committed
Defensive programming on potential infinite loop with Eof on lident recovery.
1 parent f5b28dc commit eeaa86f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/res_core.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ let rec parseLident p =
623623
None
624624
) else (
625625
let rec loop p =
626-
if not (Recover.shouldAbortListParse p)
626+
if not (Recover.shouldAbortListParse p) && p.token <> Eof
627627
then begin
628628
Parser.next p;
629629
loop p

0 commit comments

Comments
 (0)