Commit abfc038b authored by Timothy Bourke's avatar Timothy Bourke Committed by Gwenaël Delaval

Accept single line "--" comments

parent 2d9fb52b
...@@ -223,6 +223,8 @@ rule token = parse ...@@ -223,6 +223,8 @@ rule token = parse
Loc (comment_start, comment_end))) Loc (comment_start, comment_end)))
end; end;
token lexbuf } token lexbuf }
| "--"
{ single_line_comment lexbuf }
| ['!' '?' '~'] | ['!' '?' '~']
['!' '$' '%' '&' '*' '+' '-' '.' '/' ':' ['!' '$' '%' '&' '*' '+' '-' '.' '/' ':'
'<' '=' '>' '?' '@' '^' '|' '~'] * '<' '=' '>' '?' '@' '^' '|' '~'] *
...@@ -305,6 +307,10 @@ and comment = parse ...@@ -305,6 +307,10 @@ and comment = parse
| _ | _
{ comment lexbuf } { comment lexbuf }
and single_line_comment = parse
| newline { token lexbuf }
| _ { single_line_comment lexbuf }
and string = parse and string = parse
| newline { new_line lexbuf; string lexbuf } | newline { new_line lexbuf; string lexbuf }
| '"' | '"'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment