Pass StringLiteral instruction extracted string literal from StringExpression synmbol

Removed TODO
This commit is contained in:
Tristan B. Velloza Kildaire 2022-07-26 09:59:27 +02:00
parent e2157f428c
commit d19512668a
1 changed files with 6 additions and 2 deletions

View File

@ -283,12 +283,16 @@ public final class TypeChecker
* Add the char* type as string literals should be
* interned
*/
addType(getType(modulle, "char*")); /* FIXME: Make char* */
addType(getType(modulle, "char*"));
/**
* Add the instruction (TODO: add comment)
* and pass the literal to it
*/
StringLiteral strLitInstr = new StringLiteral();
StringExpression strExp = cast(StringExpression)statement;
string strLit = strExp.getStringLiteral();
gprintln("String literal: `"~strLit~"`");
StringLiteral strLitInstr = new StringLiteral(strLit);
addInstr(strLitInstr);
gprintln("Typecheck(): String literal processing... [done]");