Exemple #1
0
 public override IEnumerable <string> Dump() => new[]
 {
     "while statement:\n",
     "  condition:\n"
 }
 .Concat(Condition.Dump().Select(MapFunc2))
 .Concat(new[] { "  body:\n" })
 .Concat(Optimized == 1
                         ? new[] { "   [optimized]" }
                         : OkStatementList.Dump().Select(MapFunc2));
Exemple #2
0
 public override IEnumerable <string> Dump() => new[]
 {
     "if statement:\n",
     "  condition:\n"
 }
 .Concat(Condition.Dump().Select(MapFunc2))
 .Concat(new[] { $"  true branch{(Optimized == 2 ? " [optimized]" : "")}:\n" })
 .Concat(IfStatementList.Dump().Select(MapFunc2))
 .Concat(new[] { $"  false branch{(Optimized == 1 ? " [optimized]" : "")}:\n" })
 .Concat(ElseStatementList.Dump().Select(MapFunc2));