mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 07:53:43 +08:00
add quoted idents
This commit is contained in:
@@ -10,6 +10,7 @@ rule token = parse
|
||||
| ['0'-'9']+ { INT (int_of_string (Lexing.lexeme lexbuf)) }
|
||||
| ['0'-'9']+'.'['0'-'9']* { FLOAT (float_of_string (Lexing.lexeme lexbuf)) }
|
||||
| '$'?['a'-'z' '_' 'A'-'Z'] (['a'-'z' 'A'-'Z' '_' '.' '0'-'9']*) { IDENT (Lexing.lexeme lexbuf) }
|
||||
| '\''[^'\'']+'\'' { let s = Lexing.lexeme lexbuf in IDENT (String.sub s 1 (String.length s - 2)) }
|
||||
| ',' { COMMA }
|
||||
| ';' { SEMICOLON }
|
||||
| ':' { COLON }
|
||||
|
||||
Reference in New Issue
Block a user