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); }
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; }
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; }