상속: Statement
예제 #1
0
		public void Visit(WhileStatement expression)
		{
			Builder.Append("while (");
			expression.Condition.Accept(this);
			Builder.AppendLine(") {");
			indent++;
			Indent();
			expression.Statement.Accept(this);
			indent--;
			Indent();
			Builder.AppendLine("}");
		}
예제 #2
0
        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();
            }
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
파일: IronJint.cs 프로젝트: welias/IronWASP
 void Analyze(WhileStatement Stmt)
 {
     SetCurrentLineAndCharNos(Stmt);
     if (Stmt.Condition != null) Analyze(Stmt.Condition);
     if (Stmt.Statement != null) Analyze(Stmt.Statement);
 }