Beispiel #1
0
		private WhileStatement ParseWhile()									
		{
            WhileStatement node = new WhileStatement(curtok);
			Advance(); // advance over While

			AssertAndAdvance(TokenID.LParen);
			node.Test = ParseExpression();
			AssertAndAdvance(TokenID.RParen);

			ParseBlock(node.Statements);
			
			if (curtok.ID == TokenID.Semi)
				Advance();
			return node;
		}
        public virtual object VisitWhileStatement(WhileStatement whileStatement, object data)
        {
            stackMap.Push(whileStatement);
            whileStatement.Test.AcceptVisitor(this, data);

            whileStatement.Statements.AcceptVisitor(this, data);

            stackMap.Pop();
            return null;

        }