- implemented type parsing including custom types and generics (useless
for now as we do no semantic analysis)
- implemented struct literal parsing
- implemented struct definition parsing (no generics yet)
- implemented tuple parsing
- registers are now allocated starting from zero
- updated to-dos
5`
- implementation of logical and shift operations in parser and codegen.
- implementation of sizeof keyword as unary operator
in progress (non functional)
- implementation of prefix and postfix inc/dec operators
- array access by index (implemented, untested as arrays aren't
implemented yet). essentially just a pointer write with offset.
- struct/member access (parsing implemented, untested.)
- If statements work properly now (hopefully)
- still issues with while loops pushing vars to the stack. need scoping
implemented to fix this!
- refactored registers.rs and fixed faulty logic.
- made register allocation optimisations
- updated lexer to allow hex and binary integer literals
- updated parser with support for writing to pointers
- updated code generation to support writing to pointers
- fixed a bug with codegen where args are loaded from incorrect offsets
due to saving registers prior to calling.
- basic pointers and reading values from pointers works
- writing to pointers not yet implemented (looks painful so a problem
for tomorrow)
- updated print library. the compiler has this hardcoded in all programs
for now