Assign variables

This commit is contained in:
2024-03-14 08:52:45 +01:00
parent 25657ac36d
commit 99a1ef5f96
18 changed files with 700 additions and 339 deletions

10
TODO
View File

@ -5,13 +5,15 @@
- Parser should be able to collect errors.
- Provide position information on parse tree nodes.
- Move constants to the symbol table, so we can check at parse time for duplicates.
- Allow defining variables.
- Don't pass raw pointers to the visitor methods.
- Make error abstract and derive unexpected_token in the lex module from it.
- Wrap the tokens in a struct with methods for incrementing and lookups.
- While loop.
- If condition.
- Grouping multiple statements with begin and end (compound_statement).
- Introduce program node which contains global state and functions.
- Calculate additional stack space needed for subexpressions in the allocator
visitor and not in the backend.
- Support immediates greater than 12 bits.
- It seems instructions are correctly encoded only if the compiler is running
on a little endian architecture.
# Shell
- Persist the history.