Commit Graph

33 Commits (master)

Author SHA1 Message Date
Nick Krichevsky dab467b560 Break out parsing for for loop components 2024-05-26 11:00:44 -04:00
Nick Krichevsky ccd5de6720 Add for loop support 2024-05-25 10:49:24 -04:00
Nick Krichevsky f2bde7ddcb Add whlie loop support 2024-05-24 11:09:41 -04:00
Nick Krichevsky 32266d07f6 Allow eq eq comparison between strings 2024-05-24 10:42:23 -04:00
Nick Krichevsky 465039cf43 Fix bug where assignment would shadow variables in higher scopes 2024-05-24 10:35:39 -04:00
Nick Krichevsky 7dbba9bf1e Fix bug where single statements could not be executed in the REPL 2024-05-23 12:53:39 -04:00
Nick Krichevsky b00d635820 Handle logical comparisons 2024-05-23 12:29:56 -04:00
Nick Krichevsky 6aa29e25f4 Add support for if statements 2024-05-23 11:43:02 -04:00
Nick Krichevsky 5b1194ad35 Fix backwards lexing for lt and gt 2024-05-23 11:40:54 -04:00
Nick Krichevsky 2036704732 Add printing support for assignment operators 2024-05-22 18:43:56 -04:00
Nick Krichevsky 21e1c315ad Print implicit statements 2024-05-22 17:48:46 -04:00
Nick Krichevsky 1b826430f0 Change all script strings to Rc<str> 2024-05-22 17:45:29 -04:00
Nick Krichevsky 3c348e92ca Add support for implicit semicolons in the repl 2024-05-22 17:32:11 -04:00
Nick Krichevsky 893dab62c7 Minor cleanup 2024-05-22 15:08:38 -04:00
Nick Krichevsky b4e1fa7690 Implement assignment 2024-05-22 15:08:02 -04:00
Nick Krichevsky 6f7e2eb499 Add block scoping of variables 2024-05-22 14:10:29 -04:00
Nick Krichevsky 11df867c06 Allow variables to persist across REPL lines 2024-05-21 22:28:08 -04:00
Nick Krichevsky 32f6628328 Change EvaluatedValue::String to Rc<str> 2024-05-21 22:21:28 -04:00
Nick Krichevsky 0b4d4d6d21 Add support for variable declaration 2024-05-21 22:03:18 -04:00
Nick Krichevsky b9b7f0b387 fix bug where groupings didn't work 2024-05-21 15:57:36 -04:00
Nick Krichevsky 0a8a493bad Make match_token_kind! macro preserve the token in case of error 2024-05-21 15:35:46 -04:00
Nick Krichevsky d497e19564 Move token matching into a macro 2024-05-21 15:23:53 -04:00
Nick Krichevsky 8cdfbd61a9 Move code generation into a build script 2024-05-21 11:46:49 -04:00
Nick Krichevsky 96ca870db0 Add support for executing statements 2024-05-17 10:22:08 -04:00
Nick Krichevsky 1bcf145f93 Clean up error display 2024-05-16 13:03:24 -04:00
Nick Krichevsky 4c49512624 Add error handling around evaluation 2024-05-16 13:02:07 -04:00
Nick Krichevsky d80650ddab Add first pass at interpreter (everything before the error checking section) 2024-05-15 16:43:57 -04:00
Nick Krichevsky 3100b77003 Add first pass at parser from parsing chapter 2024-05-15 15:26:14 -04:00
Nick Krichevsky 70625afcaf Add AST generation code and test visitor 2024-05-15 11:20:17 -04:00
Nick Krichevsky cf7c64a7d9 Migrate to using Error token in lexer 2024-05-15 08:52:55 -04:00
Nick Krichevsky 0b437250be Add support for block comments to lexer 2024-05-14 22:33:32 -04:00
Nick Krichevsky 5838b7eec9 Add initial Lexer 2024-05-14 22:02:08 -04:00
Nick Krichevsky c5efd89e03 Initial cargo project 2024-05-14 17:01:51 -04:00