diff options
author | Paweł Dybiec <pdybiec@stud.cs.uni.wroc.pl> | 2018-11-07 11:47:16 +0100 |
---|---|---|
committer | Paweł Dybiec <pdybiec@stud.cs.uni.wroc.pl> | 2018-11-07 11:47:16 +0100 |
commit | ee27725c41749aa7bd52c450b1e0daa92ce4025c (patch) | |
tree | aacd16e98c534258547ccfc850ec57de21bc5c24 /source/mod_student/lexer.mll | |
parent | Fix ast rawprinter (diff) |
Add semicolons, multi variable declaration. Fix returns
Diffstat (limited to 'source/mod_student/lexer.mll')
-rw-r--r-- | source/mod_student/lexer.mll | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/mod_student/lexer.mll b/source/mod_student/lexer.mll index 2a4b116..bfc279a 100644 --- a/source/mod_student/lexer.mll +++ b/source/mod_student/lexer.mll @@ -89,6 +89,7 @@ let implode l = | '"' str as e '"' { STRING (unescape e) } | "'" (chr as e) "'" { CHAR (unescape_chr e) } | "," { COMMA } + | ";" { SEMICOLON } | "(" { LPAREN } | ")" { RPAREN } | "{" { LBRACKET } @@ -118,6 +119,7 @@ let implode l = | "length" { LENGTH } | "int" { T_INT } | "bool" { T_BOOL } + | "_" { UNDERSCORE } | identifier as id { IDENTIFIER id } | integer as i { INT (int_of_string i) } |