Split up responsibilities of Compiler
#27
Labels
refactoring
Improvements to the program's structure
Milestone
Compiler
#27
For improved testability, it would be cool to factor out the explicit path and file handling from
Compiler
and divide up its responsibilities into individual methods or perhaps even different modules:Vec<Instruction>
Vec<Instruction>
to a.asm
source file (or, if that's not sufficient, introduce a newstruct
for representing a complete.asm
file abstractly and generate that instead)nasm
on the resulting.asm
source fileThis should also make it easier to perform non-black box testing, since we could perform assertions directly on the generated instructions for a block of code.
The text was updated successfully, but these errors were encountered: