public void Visit(WhileStatement expression) { Builder.Append("while ("); expression.Condition.Accept(this); Builder.AppendLine(") {"); indent++; Indent(); expression.Statement.Accept(this); indent--; Indent(); Builder.AppendLine("}"); }
public void Visit(WhileStatement statement) { JsObject scope = new JsObject(); EnterScope(scope); try { statement.Condition.Accept(this); while (Result.ToBoolean()) { statement.Statement.Accept(this); ResetContinueIfPresent(statement.Label); if (StopStatementFlow()) { if (breakStatement != null && statement.Label == breakStatement.Label) { breakStatement = null; } return; } statement.Condition.Accept(this); } } finally { ExitScope(); } }
public void Visit(WhileStatement statement) { statement.Condition.Accept(this); EnsureIdentifierIsDefined(Result); while (Result.ToBoolean()) { statement.Statement.Accept(this); ResetContinueIfPresent(statement.Label); if (StopStatementFlow()) { if (breakStatement != null && statement.Label == breakStatement.Label) { breakStatement = null; } return; } statement.Condition.Accept(this); } }
void Analyze(WhileStatement Stmt) { SetCurrentLineAndCharNos(Stmt); if (Stmt.Condition != null) Analyze(Stmt.Condition); if (Stmt.Statement != null) Analyze(Stmt.Statement); }