Commit 3b42bafb authored by Julien Lopez's avatar Julien Lopez

Bug fix in lexer

parent c6997a74
......@@ -289,9 +289,10 @@ and token2 = lexer
let s = get_stored_string () in
return_loc start (L.lexeme_end lexbuf) (STRING2 s)
| _ -> assert false) () lexbuf
| "('" ncname ")" ->
| "(" [" \t"]* "'" ncname [" \t"]* ")" ->
let s = L.utf8_lexeme lexbuf in
let s = String.sub s 1 (String.length s - 1) in
let s = Str.global_replace (Str.regexp "[ \t]") "" s in
let s = String.sub s 2 (String.length s - 3) in
return lexbuf (PTYPE s)
| "'" ncname ->
let s = L.utf8_lexeme lexbuf in
......@@ -348,9 +349,10 @@ and token2toplevel = lexer
let s = get_stored_string () in
return_loc start (L.lexeme_end lexbuf) (STRING2 s)
| _ -> assert false) () lexbuf
| "('" ncname ")" ->
| "(" [" \t"]* "'" ncname [" \t"]* ")" ->
let s = L.utf8_lexeme lexbuf in
let s = String.sub s 1 (String.length s - 1) in
let s = Str.global_replace (Str.regexp "[ \t]") "" s in
let s = String.sub s 2 (String.length s - 3) in
return lexbuf (PTYPE s)
| "'" ncname ->
let s = L.utf8_lexeme lexbuf in
......
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