Added plumbing for code generation

This commit is contained in:
Tristan B. Kildaire 2021-06-01 15:18:09 +02:00
parent d34dd5b689
commit 274ea767a2
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
module compiler.codegen.core;
import compiler.symbols.data;
/**
* TODO: Perhaps have an interface that can emit(Context/Parent, Statement)
*/
/* TODO: Module linking (general overhaul required) */
public class CodeGenerator
{
/* The Module */
Module modulle;
this(Module modulle)
{
this.modulle = modulle;
}
}
public import compiler.codegen.dgen;
/**
* Emittable
*
* All structures that can emit code go under here
*/
public interface Emittable
{
public string emit();
}