Accept single line "--" comments
This commit is contained in:
parent
2d9fb52bec
commit
abfc038b6b
1 changed files with 6 additions and 0 deletions
|
@ -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 }
|
||||
| '"'
|
||||
|
|
Loading…
Reference in a new issue