5d1d3bd0a4
Parser - Fixed function call parsing
2023-01-02 20:06:36 +01:00
250eddea71
Parser - Parse function declarations
2023-01-02 18:57:25 +01:00
cd731d387a
Parser - Renamed method
2023-01-02 18:33:20 +01:00
fecea3b388
Parser - Support for calls with arbitrary expressions as the callee
2023-01-02 15:32:33 +01:00
312cdf18d5
Parser - Maximum argument count for functions
2023-01-02 15:18:02 +01:00
acbce309fa
Parser - Support for function calls
2023-01-02 15:15:34 +01:00
a317e54426
CLIPPY IS GOD.
2023-01-02 14:10:32 +01:00
4c54643a8d
Parser - Use new loop AST node
2023-01-02 12:10:37 +01:00
c407fcd546
Parser - Improved recovery after break/continue w/ unknown label
2023-01-02 12:07:10 +01:00
06ae3dd973
Parser - Fixed named loop finder.
2023-01-02 12:00:46 +01:00
c5c8b04355
Parser - Removed unused code
2023-01-02 11:25:02 +01:00
c36654fb7e
Parser - Labelled loops
2023-01-02 10:44:37 +01:00
bf8eee7ecb
Parser - Loop control statements
...
* Store a loop parsing state when entering a loop. The parser uses
this to cause an error when break/continue are found outside a loop.
* Parse break and continue statements w/ optional identifier
2023-01-02 10:25:48 +01:00
b9e659350b
Parser - Re-use for loop body if it's a block and an incr statement is needed
2023-01-01 19:47:04 +01:00
f95fcc4e3e
Parser - Initial implementation of the for loop
2023-01-01 19:41:02 +01:00
d8888fd15f
Parser - Re-added parens around if / while conditions
...
Mostly because lox's for loop is C-like and would feel weird without
parens.
2023-01-01 19:04:37 +01:00
daec88c2f8
Parser - While loops
2023-01-01 18:40:05 +01:00
5db3caab61
Parser - Fixed comments
2023-01-01 18:13:32 +01:00
2e0e3f9ef0
Parser - Support for and / or
2023-01-01 11:18:08 +01:00
8711fde112
Parser - Support for if statement
...
* Different from the book's implemenation as it doesn't use additional parens
2023-01-01 11:04:32 +01:00
7d22b15854
Parser - Support for blocks
2022-12-31 17:05:58 +01:00
71ddef17d8
Parser - Fixed error recovery
2022-12-31 16:42:32 +01:00
5efc90e89b
Parser - Error recovery
2022-12-31 16:40:59 +01:00
3a2e8eeda1
Parser - Variable assignment
2022-12-31 16:27:32 +01:00
157c938395
AST - Store variable names as tokens in declarations
2022-12-31 16:06:20 +01:00
d821331fa2
Parser - Variable references in expressions
2022-12-31 15:44:26 +01:00
447e0fe623
Parser - Handle variable declarations
2022-12-31 15:39:52 +01:00
14aef73d93
Interpreter - Run programs.
2022-12-31 15:19:41 +01:00
bf11a2b63a
Parser - Parse program as a list of statements
2022-12-31 14:45:55 +01:00
7b66c35e16
Parser - Synchronize method
2022-12-31 12:27:51 +01:00
980729ceb3
Tokens - Renamed EOF to Eof
2022-12-31 10:17:25 +01:00
45ed237818
Parser - Removed useless clone
2022-12-31 10:14:58 +01:00
1e122c77a5
Parser - Comments
2022-12-31 10:12:11 +01:00
fc345f2ffb
Parser - Parse expressions
2022-12-31 00:50:31 +01:00
ed03d565ea
Parser - Created structure
2022-12-30 23:50:33 +01:00