Implement some statements

- Impl. expression only statement (expr;)
- Impl. let binding ("let" ident "=" expr;)
- Impl. assignment (ident "=" expr;)
This commit is contained in:
2021-12-24 01:48:18 +01:00
parent 5be3fd5bbc
commit 41b7247ffd
3 changed files with 108 additions and 40 deletions

View File

@@ -4,7 +4,7 @@ use plang2_lib::*;
fn main() {
let code = r#"
(-(-5+2)*-(2*-sqrt(9))+-(a-6)) % 30
a = 54 * sqrt(9);
"#;
let mut lexer = Lexer::new(code);