Typechecking

- Cleaned up imports
- Added TODOs and a stub `beginEmit(InitQueue, CodeQueue)` method to be used for the beginning of the code emit process
This commit is contained in:
Tristan B. Velloza Kildaire 2022-12-11 17:33:18 +02:00
parent 466b722bcc
commit 6253281f6f
1 changed files with 32 additions and 6 deletions

View File

@ -10,6 +10,9 @@ import compiler.parsing.core;
import compiler.typecheck.resolution;
import compiler.typecheck.exceptions;
import compiler.symbols.typing.core;
import compiler.typecheck.dependency.core;
import compiler.codegen.instruction;
import std.container.slist;
/**
* The Parser only makes sure syntax
@ -37,6 +40,23 @@ public final class TypeChecker
/* TODO: Module check?!?!? */
}
/**
* Call this function once the typechecking/codequeue generation
* is completed
*
* Params:
* initQueue = The allocation queue
* codeQueue = The code queue
*/
private void beginEmit(SList!(Instruction) initQueue, SList!(Instruction) codeQueue)
{
// TODO: Implement me
}
/**
* I guess this should be called rather
* when processing assignments but I also
@ -64,7 +84,6 @@ public final class TypeChecker
* non-cyclic
*
*/
import compiler.typecheck.dependency.core;
// DNodeGenerator.staticTC = this;
@ -103,13 +122,20 @@ public final class TypeChecker
* 1. Fetch the tree from the DNodeGenerator
*/
/**
* (TODO)
*
* Create a code genertaor here and pass it the needed information
* 1. Init queue
* 2. Code queue
* 3. Types?!?!? (probably not)
*/
beginEmit(initQueue, codeQueue);
}
import compiler.typecheck.dependency.core;
import std.container.slist;
import compiler.codegen.instruction;
/* Main code queue */
private SList!(Instruction) codeQueue;