Skip to content

Commit

Permalink
fix for files with ending comments and EOF (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabryon99 committed Dec 20, 2021
1 parent d02f47a commit 1923f97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/scanner.mll
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,13 @@ rule next_token = parse
and single_line_comment = parse
| "\r\n"
| "\n" { Lexing.new_line lexbuf; () }
| eof { () }
| _ { single_line_comment lexbuf }
and multi_line_comment = parse
| "*/" { () }
| "\n"
| "\r\n" { Lexing.new_line lexbuf; multi_line_comment lexbuf }
| eof { () }
| _ { multi_line_comment lexbuf }
and character c = parse
| ['''] { CHAR(c) }
Expand Down

0 comments on commit 1923f97

Please sign in to comment.