Refactoring

Removed uneeded type 'Symbol'
parser_exception_before
Tristan B. V. Kildaire 2021-03-30 17:31:37 +02:00
parent f693d71a8a
commit 6649804d4e
6 changed files with 5 additions and 17 deletions

View File

@ -6,7 +6,7 @@ import compiler.lexer;
import std.stdio : File;
import compiler.parser;
import compiler.symbols;
import compiler.typecheck;
import compiler.typecheck.core;
void beginCompilation(string[] sourceFiles)
{

View File

@ -46,18 +46,6 @@ public enum SymbolType
UNKNOWN
}
public class Symbol
{
/* Token */
private Token token;
private SymbolType symbolType;
this(SymbolType symbolType, Token token)
{
this.token = token;
this.symbolType = symbolType;
}
}
@ -677,7 +665,7 @@ public class Variable : TypedEntity
public class Expression : Statement
{
import compiler.typecheck;
import compiler.typecheck.core;
/* TODO: Takes in symbol table? */
public string evaluateType(TypeChecker typechecker, Container c)
{
@ -788,7 +776,7 @@ public class VariableExpression : IdentExpression
super(identifier);
}
import compiler.typecheck;
import compiler.typecheck.core;
public override string evaluateType(TypeChecker typeChecker, Container c)
{
string type;

View File

@ -1,4 +1,4 @@
module compiler.typecheck;
module compiler.typecheck.core;
import compiler.symbols;
import std.conv : to;

View File

@ -19,7 +19,7 @@ int ll = f(1,1);
public ubyte k = 1;
private ubyte k2 = 1;
protected ubyte k3 = 1-1;
protected ubyte k3 = -1;
public class clazz1