예제 #1
0
        public virtual object VisitForeachStatement(ForEachStatement foreachStatement, object data)
        {
            stackMap.Push(foreachStatement);

            foreachStatement.Iterator.AcceptVisitor(this, data);
            foreachStatement.Collection.AcceptVisitor(this, data);
            foreachStatement.Statements.AcceptVisitor(this, data);

            stackMap.Pop();
            return(null);
        }
예제 #2
0
		private ForEachStatement ParseForEach()								
		{
            ForEachStatement node = new ForEachStatement(curtok);
			Advance(); // advance over FOREACH

			AssertAndAdvance(TokenID.LParen);
			node.Iterator = ParseParamDecl();
			AssertAndAdvance(TokenID.In);
			node.Collection = ParseExpression();
			AssertAndAdvance(TokenID.RParen);

			//node.Statements = ParseBlock().Statements;

			if (curtok.ID == TokenID.Semi)
				Advance();
			return node;
		}
예제 #3
0
        public virtual object VisitForeachStatement(ForEachStatement foreachStatement, object data)
        {
            stackMap.Push(foreachStatement);
            foreachStatement.Iterator.AcceptVisitor(this, data);
            foreachStatement.Collection.AcceptVisitor(this, data);
             foreachStatement.Statements.AcceptVisitor(this, data);

             stackMap.Pop();
             return null;

        }