Skip to content

Commit a1df89a

Browse files
committed
Fix infinite loop with unclosed comments
1 parent 734a14e commit a1df89a

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/expr.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ let focus_op = "@"
3232

3333
let def_op = ":="
3434

35-
let typedef_op = "::"
36-
3735
let expect_op = "=="
3836

3937
let params_op = "$params"

src/lexer.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let rec comment lexbuf =
1616

1717
and comments lexbuf =
1818
match%sedlex lexbuf with
19-
| "'''" -> read lexbuf
19+
| "'''" | eof -> read lexbuf
2020
| _ ->
2121
ignore (Sedlexing.next lexbuf);
2222
comments lexbuf

0 commit comments

Comments
 (0)