Expressions

- Made the `Expression` class abstract
- Removed irrelevant TODOs and method
- Removed uneeded constructor

VariableExpression

- Removed unused junk
This commit is contained in:
Tristan B. Velloza Kildaire 2023-07-17 15:01:46 +02:00
parent 2411969955
commit f1aaaf1088
2 changed files with 3 additions and 28 deletions

View File

@ -814,17 +814,6 @@ public class VariableExpression : IdentExpression
super(identifier);
}
import tlang.compiler.typecheck.core;
public override string evaluateType(TypeChecker typeChecker, Container c)
{
string type;
return null;
}
public override string toString()
{
return "[varExp: "~getName()~"]";

View File

@ -218,25 +218,11 @@ public abstract class NumberLiteral : Expression
}
}
public class Expression : Statement
{
import tlang.compiler.typecheck.core;
/* TODO: Takes in symbol table? */
public string evaluateType(TypeChecker typechecker, Container c)
{
/* TODO: Go through here evaluating the type */
return null;
}
this()
public abstract class Expression : Statement
{
}
/* TODO: Evalute this expression's type */
}
public final class NewExpression : Expression
{
private FunctionCall funcCall;