Beispiel #1
0
		public void Visit(DoWhileStatement expression)
		{
			Builder.AppendLine("do {");
			indent++;
			Indent();
			expression.Statement.Accept(this);
			indent--;
			Indent();
			Builder.AppendLine().Append("} while (");
			expression.Condition.Accept(this);
			Builder.AppendLine(" );");

		}
Beispiel #2
0
        public void Visit(DoWhileStatement statement)
        {
            JsObject scope = new JsObject();
            EnterScope(scope);
            try
            {
                do
                {
                    statement.Statement.Accept(this);

                    ResetContinueIfPresent(statement.Label);

                    if (StopStatementFlow())
                    {
                        if (breakStatement != null && statement.Label == breakStatement.Label)
                        {
                            breakStatement = null;
                        }

                        //ExitScope();
                        return;
                    }

                    statement.Condition.Accept(this);

                } while (Result.ToBoolean());
            }
            finally
            {
                ExitScope();
            }
        }
Beispiel #3
0
        public void Visit(DoWhileStatement statement)
        {
            do {
                statement.Statement.Accept(this);

                ResetContinueIfPresent(statement.Label);

                if (StopStatementFlow()) {
                    if (breakStatement != null && statement.Label == breakStatement.Label) {
                        breakStatement = null;
                    }

                    return;
                }

                statement.Condition.Accept(this);

                EnsureIdentifierIsDefined(Result);

            } while (Result.ToBoolean());
        }
Beispiel #4
0
 void Analyze(DoWhileStatement Stmt)
 {
     SetCurrentLineAndCharNos(Stmt);
     if(Stmt.Condition != null) Analyze(Stmt.Condition);
     if (Stmt.Statement != null) Analyze(Stmt.Statement);
 }