VariableAssignment

- Removed the `Variable` and `getVariable` and `setVariable` components; deemed harmful and not needed

Parser

- Don't use removed method from the `VariableAssignment` class
This commit is contained in:
Tristan B. Velloza Kildaire 2024-05-11 11:17:20 +02:00
parent 1e2e59a99e
commit 9373c280a0
2 changed files with 1 additions and 16 deletions

View File

@ -1731,8 +1731,6 @@ public final class Parser
Variable variable = new Variable(type, identifier);
variable.addAssignment(varAssign);
varAssign.setVariable(variable);
generated = variable;
}
else

View File

@ -675,7 +675,6 @@ public import tlang.compiler.symbols.expressions;
public class VariableAssignment : Statement, MStatementSearchable, MStatementReplaceable, MCloneable
{
private Expression expression;
private Variable variable;
this(Expression expression)
{
@ -687,21 +686,9 @@ public class VariableAssignment : Statement, MStatementSearchable, MStatementRep
return expression;
}
public Variable getVariable()
{
return variable;
}
// NOTE-to-self: Very interesting method we have here, is this just for debugging?
// (15th May 2023, whilst working on Meta)
public void setVariable(Variable variable)
{
this.variable = variable;
}
public override string toString()
{
return "[varAssignDec'd: To: "~variable.toString()~"]";
return "[varAssignDec: Expr: "~expression.toString()~"]";
}
public override Statement[] search(TypeInfo_Class clazzType)