visitForStmt method

  1. @override
void visitForStmt(
  1. For stmt
)
override

Implementation

@override
void visitForStmt(Stmt.For stmt) {
  if (stmt.initializer != null) {
    resolveStmt(stmt.initializer!);
  }
  if (stmt.condition != null) {
    resolveExpr(stmt.condition!);
  }
  if (stmt.increment != null) {
    resolveExpr(stmt.increment!);
  }
  _loopDepth++;
  resolveStmt(stmt.body);
  _loopDepth--;
}