add comments support
This commit is contained in:
parent
6188140b44
commit
ab6e8c466b
1 changed files with 6 additions and 0 deletions
|
@ -18,4 +18,10 @@ rule token = parse
|
|||
| '=' { Lassign }
|
||||
| ';' { Lsc }
|
||||
| ident as i { Lvar i }
|
||||
| '#' { comment lexbuf }
|
||||
| _ as c { raise (Error c) }
|
||||
|
||||
and comment = parse
|
||||
| eof { Lend }
|
||||
| '\n' { Lexing.new_line lexbuf; token lexbuf }
|
||||
| _ { comment lexbuf }
|
||||
|
|
Reference in a new issue