added nil, true, false literals to the parser!

This commit is contained in:
tali 2023-12-02 17:04:14 -05:00
parent 333b8e7450
commit 1da782920e
1 changed files with 3 additions and 0 deletions

View File

@ -54,6 +54,9 @@ infixexp:
| e1 = infixexp; op = Binop; e2 = singleexp { infix_app e1 op e2 }
singleexp:
| "nil" { Literal Nil }
| "true" { Literal True }
| "false" { Literal False }
| i = Int { Literal (Int i) }
| p = path { Path p }
| f = path; a = args { Call (f, a) }