Permalink
Browse files

Skip comments

  • Loading branch information...
1 parent 00dead4 commit e2a35806227268dbfba90ee6acdf1cf3082db1d3 @samoht committed Nov 9, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 cass_lexer.mll
View
@@ -45,6 +45,7 @@ rule token = parse
| '$' { debug "$*$"; update lexbuf; DOLLAR (dollar lexbuf) }
| '"' { debug "\"*\""; update lexbuf; STRING (Printf.sprintf "\"%s\"" (dquote lexbuf)) }
| '\'' { debug "\'"; update lexbuf; STRING (Printf.sprintf "\"%s\"" (quote lexbuf)) }
+ | "/*" { comments lexbuf; token lexbuf }
| eof { debug "EOF"; update lexbuf; EOF }
| all* as x { debug "%s" x; update lexbuf;
if x.[String.length x - 1] = ':' then
@@ -60,3 +61,7 @@ and dquote = parse
and quote = parse
| ([^ '\'']* as str) '\'' { update lexbuf; str }
+
+and comments = parse
+ | "*/" { () }
+ | _ { comments lexbuf }

0 comments on commit e2a3580

Please sign in to comment.