- Removed all `emit()` methods (this is now done in the language-specific emitter - DGen)
CoreEmitter
- Added docstrings
- Added required `transform(Instruction)` method which must transform each provided Instruction into a string (a.k.a. do the actual emit()-ting)
DGen
- Migrated C-emit code into the overrided `transform(Instruction)` method
- VariableAssignment entity now has its Context object set to the current Context (of the Variable being declared) (so this is a declare assignment case only (so far)) (fixes #36)
TypeChecker
- Extract the Context object from the VariableAssignment entity and then set it as the Context for the VariableAssigmnetInstr instruction (fixes #36)
VariableAssigmnentInstr
- The `emit()` method will now emit the assignment code
Check
- Added `getCharacter(SymbolType)` which maps a SymbolType to a maths operator (WIP)
- Implemented the correct emit for this instruction (just emits the string version of the ulong `data`
BinOpInstr
- Emit is almost correct, just missing a mapping from SymbolType to the maths operator required
- Added new SymbolMapper class with a static method which will take a Container and an entity name, resolve the Entity and then generate the hash of the absolute path to said entity and return this as the `symbol name`
TypeChecker
- Set the static field to refer to this instance of the TypeChecker (in the SymbolMapper class)
VariableDeclaration
- Use the `symbolLookup()` method to transform the name
- Added `finalize()` method, this is to be called whenever the emitting is done and a compiler is to be called on the code
DGen
- Implemented a gcc-based finalization method
- Added `emitEntryPoint()` to emit a main() function which is to be called in libc's `_start` symbol
VariableDeclaration
- Added note we may need a symbol table lookup system actually, rather than just a simple `symbolRename`
Compiler
- Call the `finalize()` method on the DGen code emitter
----
Test cases
- Added `simple_variables_only_decs.t` to test code generation
- Added a method which will replace the `.`s in a symbol with underscores
Instruction
- The symbol names need to be valid in C so let's just make it a rule they will only have _'s (underscores) to replace any characters like `.`s
- Pass in the type of the variable being declared to the `VariableDeclaration` instruction
VariableDeclaration
- Emitted code now contains the type of the variable being declared
- Added `getInitQueue()`
- Removed the `beginEmit(initQueue, codeQueue)` method (as this is done for us in compiler.d
CodeEmitter
- Extract init queue as well