Ejemplo n.º 1
0
			void CreateForStatement (BlockStatement body)
			{
				@for = new ForStatement (
					initializer,
					condition,
					increment,
					new BlockStatement ());

				for (int i = 0; i < body.Statements.Count - 1; i++)
					@for.Body.Statements.Add (body.Statements [i]);
			}
		public override void VisitForStatement (ForStatement node)
		{
			WriteKeyword ("for");
			WriteSpace ();
			WriteToken ("(");
			VisitExpressionStatementExpression (node.Initializer);
			WriteToken (";");
			WriteSpace ();
			Visit (node.Condition);
			WriteToken (";");
			WriteSpace ();
			VisitExpressionStatementExpression (node.Increment);
			WriteToken (")");
			WriteLine ();
			Visit (node.Body);
		}
Ejemplo n.º 3
0
		public virtual void VisitForStatement (ForStatement node)
		{
			Visit (node.Initializer);
			Visit (node.Condition);
			Visit (node.Increment);
			Visit (node.Body);
		}