summary refs log tree commit diff
path: root/source/mod_student/lexer.mll
diff options
context:
space:
mode:
authorPaweł Dybiec <pdybiec@stud.cs.uni.wroc.pl>2018-11-07 11:47:16 +0100
committerPaweł Dybiec <pdybiec@stud.cs.uni.wroc.pl>2018-11-07 11:47:16 +0100
commitee27725c41749aa7bd52c450b1e0daa92ce4025c (patch)
treeaacd16e98c534258547ccfc850ec57de21bc5c24 /source/mod_student/lexer.mll
parentFix 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.mll2
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) }