private void WriteMaybeBlock(JsStatement statement, bool newLine) { if (statement is JsBlockStatement) { output.Append(" "); statement.Accept(this); if (newLine) { output.AppendLine(); } } else { output.AppendLine(); output.CurrentIndentLevel++; statement.Accept(this); output.CurrentIndentLevel--; } }
public JsStatement TransformLoop(JsStatement loop) { if (loopNode.GetContainingType().Name.StartsWith("YieldEnumerator$") || loopNode.GetContainingType().Name.StartsWith("Async$")) { return(loop); } if (!LambdaChecker.HasLambdasWithClosedVariables(body)) { return(loop); } var result = (JsStatement)loop.Accept(this); return(result); }
public object VisitStatement(JsStatement statement, bool addNewline) { try { return(statement.Accept(this, addNewline)); } catch { if (_allowIntermediates) { _cb.AppendLine(statement.ToString()); return(null); } else { throw; } } }
public object VisitStatement(JsStatement statement, bool addNewline) { return(statement.Accept(this, addNewline)); }
public virtual JsStatement VisitStatement(JsStatement statement, TData data) { return(statement.Accept(this, data)); }