public bool VisitNode(ForLoop node)
 {
     throw new NotImplementedException();
 }
Beispiel #2
0
        public bool VisitNode(ForLoop node)
        {
            // for (initstatement; loopcondition; updatestatement) { /n contents /n }
            Write("for (");
            node.Init.AcceptVisitor(this);
            Append("; ");
            node.Condition.AcceptVisitor(this);
            Append("; ");
            node.Update.AcceptVisitor(this);
            Append(") {0}", "{");

            NestingLevel++;
            node.Body.AcceptVisitor(this);
            NestingLevel--;
            Write("{0}", "}");

            return true;
        }