mirror of
https://github.com/KarolS/millfork.git
synced 2025-04-10 01:36:59 +00:00
A for-loop index variable is also a used variable
This commit is contained in:
parent
a62f16d0a9
commit
ae1bc96da7
@ -163,7 +163,7 @@ object ForDirection extends Enumeration {
|
||||
}
|
||||
|
||||
case class ForStatement(variable: String, start: Expression, end: Expression, direction: ForDirection.Value, body: List[ExecutableStatement]) extends ExecutableStatement {
|
||||
override def getAllExpressions: List[Expression] = start :: end :: body.flatMap(_.getAllExpressions)
|
||||
override def getAllExpressions: List[Expression] = VariableExpression(variable) :: start :: end :: body.flatMap(_.getAllExpressions)
|
||||
}
|
||||
|
||||
case class DoWhileStatement(body: List[ExecutableStatement], condition: Expression) extends ExecutableStatement {
|
||||
|
Loading…
x
Reference in New Issue
Block a user