diff --git a/compiler/heptagon/parsing/hept_lexer.mll b/compiler/heptagon/parsing/hept_lexer.mll index f98418c..de58588 100644 --- a/compiler/heptagon/parsing/hept_lexer.mll +++ b/compiler/heptagon/parsing/hept_lexer.mll @@ -223,6 +223,8 @@ rule token = parse Loc (comment_start, comment_end))) end; token lexbuf } + | "--" + { single_line_comment lexbuf } | ['!' '?' '~'] ['!' '$' '%' '&' '*' '+' '-' '.' '/' ':' '<' '=' '>' '?' '@' '^' '|' '~'] * @@ -305,6 +307,10 @@ and comment = parse | _ { comment lexbuf } +and single_line_comment = parse + | newline { token lexbuf } + | _ { single_line_comment lexbuf } + and string = parse | newline { new_line lexbuf; string lexbuf } | '"'