Ejemplo n.º 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(" );");

		}
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 4
0
 void Analyze(DoWhileStatement Stmt)
 {
     SetCurrentLineAndCharNos(Stmt);
     if(Stmt.Condition != null) Analyze(Stmt.Condition);
     if (Stmt.Statement != null) Analyze(Stmt.Statement);
 }