Skip to content

Commit fb0992b

Browse files
committed
fix unmatched nested comment edge case
1 parent a7771b1 commit fb0992b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/reason_lexer.mll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,8 @@ and comment = parse
581581
let loc = Location.curr lexbuf in
582582
raise (Error (Unmatched_nested_comment loc, start_loc))
583583
(* a multiline comment nested within a line comment *)
584-
| (_, Some _) ->
585-
comment_start_loc := [];
584+
| (_ :: l, Some _) ->
585+
comment_start_loc := l;
586586
store_lexeme lexbuf;
587587
comment lexbuf;
588588
}

0 commit comments

Comments
 (0)