parent
f693d71a8a
commit
6649804d4e
|
@ -6,7 +6,7 @@ import compiler.lexer;
|
||||||
import std.stdio : File;
|
import std.stdio : File;
|
||||||
import compiler.parser;
|
import compiler.parser;
|
||||||
import compiler.symbols;
|
import compiler.symbols;
|
||||||
import compiler.typecheck;
|
import compiler.typecheck.core;
|
||||||
|
|
||||||
void beginCompilation(string[] sourceFiles)
|
void beginCompilation(string[] sourceFiles)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,18 +46,6 @@ public enum SymbolType
|
||||||
UNKNOWN
|
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
|
public class Expression : Statement
|
||||||
{
|
{
|
||||||
import compiler.typecheck;
|
import compiler.typecheck.core;
|
||||||
/* TODO: Takes in symbol table? */
|
/* TODO: Takes in symbol table? */
|
||||||
public string evaluateType(TypeChecker typechecker, Container c)
|
public string evaluateType(TypeChecker typechecker, Container c)
|
||||||
{
|
{
|
||||||
|
@ -788,7 +776,7 @@ public class VariableExpression : IdentExpression
|
||||||
super(identifier);
|
super(identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
import compiler.typecheck;
|
import compiler.typecheck.core;
|
||||||
public override string evaluateType(TypeChecker typeChecker, Container c)
|
public override string evaluateType(TypeChecker typeChecker, Container c)
|
||||||
{
|
{
|
||||||
string type;
|
string type;
|
|
@ -1,4 +1,4 @@
|
||||||
module compiler.typecheck;
|
module compiler.typecheck.core;
|
||||||
|
|
||||||
import compiler.symbols;
|
import compiler.symbols;
|
||||||
import std.conv : to;
|
import std.conv : to;
|
|
@ -19,7 +19,7 @@ int ll = f(1,1);
|
||||||
|
|
||||||
public ubyte k = 1;
|
public ubyte k = 1;
|
||||||
private ubyte k2 = 1;
|
private ubyte k2 = 1;
|
||||||
protected ubyte k3 = 1-1;
|
protected ubyte k3 = -1;
|
||||||
|
|
||||||
|
|
||||||
public class clazz1
|
public class clazz1
|
||||||
|
|
Loading…
Reference in New Issue