t/source/tlang/compiler/compiler.d

24 lines
659 B
D

module compiler.compiler;
import gogga;
import std.conv : to;
import compiler.lexer;
void beginCompilation(string[] sourceFiles)
{
/* TODO: Begin compilation process, take in data here */
gprintln("Compiling files "~to!(string)(sourceFiles)~" ...");
Lexer[] lexers;
foreach(string sourceFile; sourceFiles)
{
gprintln("Performing tokenization on '"~sourceFile~"' ...");
/* TODO: Open source file */
string sourceCode = "hello \"world\";";
Lexer currentLexer = new Lexer(sourceCode);
currentLexer.performLex();
gprintln("Collected "~to!(string)(currentLexer.getTokens()));
}
}