private static void AddAccessibleVariableDeclaration(
            IList <Variable> vars,
            Block node)
        {
            StatementLine varDecl = node as StatementLine;

            if (varDecl != null && varDecl.LocalVariableDeclaration != null)
            {
                foreach (Variable var in varDecl.LocalVariableDeclaration)
                {
                    vars.Add(var);
                }
            }

            ForeachBlock fe = node as ForeachBlock;

            if (fe != null)
            {
                vars.Add(fe.IterationVariable);
            }

            ForBlock fb = node as ForBlock;

            if (fb != null)
            {
                AddAccessibleVariableDeclaration(vars, fb.ForInitializer);
            }
        }
 public override void Visit(ForBlock block)
 {
     WriteIndent();
     Write(block.Keyword.Text);
     Write("(");
     Write(block.ForInitializer.Text);
     Write("; ");
     Write(block.ForCondition.Text);
     Write("; ");
     Write(block.ForIncrementStep.Text);
     WriteLine(")");
     StartBlock();
     VisitContainer(block.VMembers);
     EndBlock();
 }
Beispiel #3
0
 public virtual void Visit(ForBlock block)
 {
 }
Beispiel #4
0
 public override void Visit(ForBlock block)
 {
 }
Beispiel #5
0
 public override void Visit(ForBlock block)
 {
 }
Beispiel #6
0
 public override void Visit(ForBlock block)
 {
     WriteIndent();
     Write(block.Keyword.Text);
     Write("(");
     Write(block.ForInitializer.Text);
     Write("; ");
     Write(block.ForCondition.Text);
     Write("; ");
     Write(block.ForIncrementStep.Text);
     WriteLine(")");
     StartBlock();
     VisitContainer(block.VMembers);
     EndBlock();
 }
Beispiel #7
0
		public virtual void Visit(ForBlock block)
		{
			
		}