コード例 #1
0
 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--;
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public object VisitStatement(JsStatement statement, bool addNewline)
 {
     try {
         return(statement.Accept(this, addNewline));
     }
     catch {
         if (_allowIntermediates)
         {
             _cb.AppendLine(statement.ToString());
             return(null);
         }
         else
         {
             throw;
         }
     }
 }
コード例 #4
0
 public object VisitStatement(JsStatement statement, bool addNewline)
 {
     return(statement.Accept(this, addNewline));
 }
コード例 #5
0
 public virtual JsStatement VisitStatement(JsStatement statement, TData data)
 {
     return(statement.Accept(this, data));
 }