Implement division

This commit is contained in:
2024-03-09 08:36:07 +01:00
parent fe805ca893
commit a3e3be5ec7
25 changed files with 357 additions and 245 deletions

17
TODO
View File

@ -1,18 +1,13 @@
# Compiler
- Separate headers and sources for the compiler, shell and tests.
- Make writing ELF independent from the code generation.
- Argument parsing.
- Whitespaces are checked twice, in the source class and by lexing.
- Catch exceptions thrown by the argument parser and print them normally.
- Division.
- Expressions contain one or more terms. Currently it parses another expression on the right side.
- Multiple factors.
- Put riscv code into the backend namespace.
- Rename riscv backend structs to be snake case.
- Make reference and Target be nested types of the visitor.
- Rename visitors to snake case.
- The backend visitor seems to generate code before the prologue.
- 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.
# Shell
- Persist the history.