public void Visit(CommaOperatorStatement expression) { var first = true; foreach (var parameter in expression.Statements) { if (first == false) { Builder.Append(", "); } first = false; parameter.Accept(this); } }
public void Visit(CommaOperatorStatement expression) { if (expression.Statements.Count > 0) { if (expression.Statements.First() is VariableDeclarationStatement) { // This is a compound declaration var vds = (VariableDeclarationStatement)expression.Statements.First(); if (vds.Expression != null) { outStream.Write("var {0} = (", vds.Identifier); vds.Expression.Accept(this); outStream.Write(")"); } else { outStream.Write("var {0}", vds.Identifier); } foreach (var p in expression.Statements.Skip(1)) { var nextVDS = (VariableDeclarationStatement)p; if (nextVDS.Expression != null) { outStream.Write(", {0} = (", nextVDS.Identifier); nextVDS.Expression.Accept(this); outStream.Write(")"); } else { outStream.Write(", {0}", nextVDS.Identifier); } } } else { // Any other kind of CommaOperatorStatement expression.Statements.First().Accept(this); foreach (var p in expression.Statements.Skip(1)) { outStream.Write(", "); p.Accept(this); } } } }
public void Visit(CommaOperatorStatement expression) { if (expression.Statements.Count > 0) { if (expression.Statements.First() is VariableDeclarationStatement) { // This is a compound declaration var vds = (VariableDeclarationStatement)expression.Statements.First(); if (vds.Expression != null) { outStream.Write("var {0} = (", vds.Identifier); vds.Expression.Accept(this); outStream.Write(")"); } else outStream.Write("var {0}", vds.Identifier); foreach (var p in expression.Statements.Skip(1)) { var nextVDS = (VariableDeclarationStatement)p; if (nextVDS.Expression != null) { outStream.Write(", {0} = (", nextVDS.Identifier); nextVDS.Expression.Accept(this); outStream.Write(")"); } else outStream.Write(", {0}", nextVDS.Identifier); } } else { // Any other kind of CommaOperatorStatement expression.Statements.First().Accept(this); foreach (var p in expression.Statements.Skip(1)) { outStream.Write(", "); p.Accept(this); } } } }
public virtual void Visit(CommaOperatorStatement expression) { logVisit(expression); }
public void Visit(CommaOperatorStatement expression) { Dump(expression); }