The current code base has a simplistic translation module that does a simple assembly to byte/opcode translation. This new assembler will be able to do a lot more functionality-wise. Its also good the specification is more complete now, we have a better idea of the features the translation module should have supported and what the assembler will now aim to support.
Task list
This is a list of tasks related to the new assembler. Each one of these tasks will likely become its own issue in the near future.
[x] #43
[x] #42
[x] Make assembler library and add it to CMake
[x] #44
[x] #45
[ ] Create, and set up, AST
[ ] Create, and set up, Error Handling (for each stage)
[ ] Create, and set up, Lowerer (loops -> labels + gotos, if-else -> jumps)
This simplifies the generation
[ ] Create, and set up, Generator
Read package imports and grab necessary packages
Maintain a package pool so we don't read the same one twice
Read each node:
.meta exports => combined
.meta extern => read package contents and place in .data buffer and .code buffer
Global scope => .data
.code instructions => opcode instructions
labels, gotos => generate label hex
Ensure subroutines are generated above main execution code
Combine newly generated .meta, .data, and .code buffers
Description
The current code base has a simplistic translation module that does a simple assembly to byte/opcode translation. This new assembler will be able to do a lot more functionality-wise. Its also good the specification is more complete now, we have a better idea of the features the translation module should have supported and what the assembler will now aim to support.
Task list
This is a list of tasks related to the new assembler. Each one of these tasks will likely become its own issue in the near future.