mirror of https://github.com/tbklang/tlang.git
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:
parent
1e2e59a99e
commit
9373c280a0
|
@ -1731,8 +1731,6 @@ public final class Parser
|
|||
Variable variable = new Variable(type, identifier);
|
||||
variable.addAssignment(varAssign);
|
||||
|
||||
varAssign.setVariable(variable);
|
||||
|
||||
generated = variable;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue