コード例 #1
0
 public override void Decode()
 {
     bodyInfo = DecodeBody();
     initInfo = DecodeNode();
     testInfo = DecodeNode();
     updateInfo = DecodeNode();
 }
コード例 #2
0
 public override void Decode()
 {
     tryBlock = DecodeLineInfo();
     int length = DecodeLength();
     var finallyBlock = DecodeNode();
     StringBuilder b = new StringBuilder();
     string label = tryBlock.CreateLabelStmt();
     string body = tryBlock.CreateBody();
     b.AppendLine(label + "try {");
     b.AppendLine(body);
     int i = length;
     while (i > 0)
     {
         var arg = DecodeId();
         var exceptionFilter = DecodeNode();
         var catchBlock = DecodeNode();
         b.Append("} catch (" + arg);
         if (exceptionFilter != null)
         {
             b.Append(" if " + exceptionFilter.PrettyPrint());
         }
         b.AppendLine(") {");
         b.Append(catchBlock == null ? string.Empty : catchBlock.PrettyPrint());
         b.AppendLine("");
         i--;
     }
     if (finallyBlock != null)
     {
         b.AppendLine("} finally {");
         b.Append(finallyBlock.PrettyPrint());
         b.AppendLine("");
     }
     b.Append("}");
     expr = b.ToString();
 }
コード例 #3
0
 public override void Decode()
 {
     bodyInfo = DecodeBody();
     loopVarName = DecodeNode().PrettyPrint();
     objExpr = DecodeNode().PrettyPrint();
     part25 = DecodeLength();
     part3 = DecodeId();
     isForEachLoop = DecodeBool();
 }
コード例 #4
0
 public override void Decode()
 {
     bodyInfo = DecodeBody();
     loopVarName = DecodeNode().PrettyPrint();
     objExpr = DecodeNode().PrettyPrint();
     part25 = DecodeLength();
     part3 = DecodeId();
     // Doesn't seem to exist in version 1.0
     // isForEachLoop = DecodeBool();
 }
コード例 #5
0
 public override void Decode()
 {
     bodyInfo = DecodeBody();
     loopVarInfo = DecodeNode();
     initExpr = DecodeNumber();
     upperBoundInfo = DecodeNode();
     stepSize = DecodeNumber();
     part6 = DecodeLength();
     compOp = DecodeId();
 }
コード例 #6
0
 public override void Decode()
 {
     lineInfo = DecodeBody();
     length = DecodeLength();
     statements = new List<INode>();
     int i = length;
     while (i > 0)
     {
         statements.Add(DecodeNode());
         i--;
     }
     statements.AddRange(DecodeChildren());
 }
コード例 #7
0
 public override void Decode()
 {
     labelInfo = DecodeBody();
     test = DecodeNode();
     cases = new List<INode>();
     ForEachChild(() =>
     {
         var r = DecodeNode();
         if (r != null)
         {
             cases.Add(r);
         }
     });
     bodies = new List<INode>();
     ForEachChild(() =>
     {
         var q = DecodeNode();
         if (q != null)
         {
             bodies.Add(q);
         }
     });
 }
コード例 #8
0
 public override void Decode()
 {
     bodyInfo = DecodeLineInfo();
     signature = DecodeSignature();
     type = DecodeLength();
 }
コード例 #9
0
 public override void Decode()
 {
     labelInfo = DecodeLineInfo();
     jmpLocation = DecodeId();
     isBreakStatement = DecodeBool();
 }
コード例 #10
0
 public override void Decode()
 {
     bodyInfo = DecodeBody();
     condInfo = DecodeNode();
 }
コード例 #11
0
 public override void Decode()
 {
     lineInfo = DecodeLineInfo();
     expr = DecodeNode();
 }
コード例 #12
0
 public override void Decode()
 {
     body = DecodeBody();
     test = DecodeNode().PrettyPrint();
 }
コード例 #13
0
 public override void Decode()
 {
     body = DecodeLineInfo();
     test = DecodeNode();
     tail = DecodeNode();
 }
コード例 #14
0
ファイル: DoWhileExpr.cs プロジェクト: DiepEsc/jsxbin-decoder
 public override void Decode()
 {
     body = DecodeBody();
     test = DecodeNode().PrettyPrint();
 }
コード例 #15
0
 public LineInfo DecodeLineInfo()
 {
     var info = new LineInfo();
     List<string> res = new List<string>();
     var lineNumber = DecodeLength();
     var child = DecodeNode();
     int length = DecodeLength();
     info.LineNumber = lineNumber;
     info.Child = child;
     int i = length;
     while (i > 0)
     {
         info.Labels.Add(DecodeId());
         i--;
     }
     return info;
 }
コード例 #16
0
 public override void Decode()
 {
     bodyInfo = DecodeLineInfo();
     objName = DecodeNode().PrettyPrint();
 }
コード例 #17
0
ファイル: ExprNode.cs プロジェクト: DiepEsc/jsxbin-decoder
 public override void Decode()
 {
     lineInfo = DecodeLineInfo();
     expr     = DecodeNode();
 }