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

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

View File

@ -218,23 +218,9 @@ public abstract class NumberLiteral : Expression
} }
} }
public class Expression : Statement public abstract 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()
{
}
/* TODO: Evalute this expression's type */
} }
public final class NewExpression : Expression public final class NewExpression : Expression