• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "ClassDeclaration",
6      "definition": {
7        "id": {
8          "type": "Identifier",
9          "name": "ETSGLOBAL",
10          "decorators": [],
11          "loc": {
12            "start": {
13              "line": 1,
14              "column": 1,
15              "program": "for_with_break.ets"
16            },
17            "end": {
18              "line": 1,
19              "column": 1,
20              "program": "for_with_break.ets"
21            }
22          }
23        },
24        "superClass": null,
25        "implements": [],
26        "body": [
27          {
28            "type": "MethodDefinition",
29            "key": {
30              "type": "Identifier",
31              "name": "_$init$_",
32              "decorators": [],
33              "loc": {
34                "start": {
35                  "line": 1,
36                  "column": 1,
37                  "program": null
38                },
39                "end": {
40                  "line": 1,
41                  "column": 1,
42                  "program": null
43                }
44              }
45            },
46            "kind": "method",
47            "accessibility": "public",
48            "static": true,
49            "optional": false,
50            "computed": false,
51            "value": {
52              "type": "FunctionExpression",
53              "function": {
54                "type": "ScriptFunction",
55                "id": {
56                  "type": "Identifier",
57                  "name": "_$init$_",
58                  "decorators": [],
59                  "loc": {
60                    "start": {
61                      "line": 1,
62                      "column": 1,
63                      "program": null
64                    },
65                    "end": {
66                      "line": 1,
67                      "column": 1,
68                      "program": null
69                    }
70                  }
71                },
72                "generator": false,
73                "async": false,
74                "expression": false,
75                "params": [],
76                "body": {
77                  "type": "BlockStatement",
78                  "statements": [],
79                  "loc": {
80                    "start": {
81                      "line": 1,
82                      "column": 1,
83                      "program": null
84                    },
85                    "end": {
86                      "line": 1,
87                      "column": 1,
88                      "program": null
89                    }
90                  }
91                },
92                "loc": {
93                  "start": {
94                    "line": 1,
95                    "column": 1,
96                    "program": null
97                  },
98                  "end": {
99                    "line": 1,
100                    "column": 1,
101                    "program": null
102                  }
103                }
104              },
105              "loc": {
106                "start": {
107                  "line": 1,
108                  "column": 1,
109                  "program": null
110                },
111                "end": {
112                  "line": 1,
113                  "column": 1,
114                  "program": null
115                }
116              }
117            },
118            "overloads": [],
119            "decorators": [],
120            "loc": {
121              "start": {
122                "line": 1,
123                "column": 1,
124                "program": "for_with_break.ets"
125              },
126              "end": {
127                "line": 1,
128                "column": 1,
129                "program": "for_with_break.ets"
130              }
131            }
132          },
133          {
134            "type": "MethodDefinition",
135            "key": {
136              "type": "Identifier",
137              "name": "main",
138              "decorators": [],
139              "loc": {
140                "start": {
141                  "line": 16,
142                  "column": 10,
143                  "program": "for_with_break.ets"
144                },
145                "end": {
146                  "line": 16,
147                  "column": 14,
148                  "program": "for_with_break.ets"
149                }
150              }
151            },
152            "kind": "method",
153            "accessibility": "public",
154            "static": true,
155            "optional": false,
156            "computed": false,
157            "value": {
158              "type": "FunctionExpression",
159              "function": {
160                "type": "ScriptFunction",
161                "id": {
162                  "type": "Identifier",
163                  "name": "main",
164                  "decorators": [],
165                  "loc": {
166                    "start": {
167                      "line": 16,
168                      "column": 10,
169                      "program": "for_with_break.ets"
170                    },
171                    "end": {
172                      "line": 16,
173                      "column": 14,
174                      "program": "for_with_break.ets"
175                    }
176                  }
177                },
178                "generator": false,
179                "async": false,
180                "expression": false,
181                "params": [],
182                "returnType": {
183                  "type": "ETSPrimitiveType",
184                  "loc": {
185                    "start": {
186                      "line": 16,
187                      "column": 18,
188                      "program": "for_with_break.ets"
189                    },
190                    "end": {
191                      "line": 16,
192                      "column": 22,
193                      "program": "for_with_break.ets"
194                    }
195                  }
196                },
197                "body": {
198                  "type": "BlockStatement",
199                  "statements": [
200                    {
201                      "type": "VariableDeclaration",
202                      "declarations": [
203                        {
204                          "type": "VariableDeclarator",
205                          "id": {
206                            "type": "Identifier",
207                            "name": "n",
208                            "decorators": [],
209                            "loc": {
210                              "start": {
211                                "line": 17,
212                                "column": 9,
213                                "program": "for_with_break.ets"
214                              },
215                              "end": {
216                                "line": 17,
217                                "column": 10,
218                                "program": "for_with_break.ets"
219                              }
220                            }
221                          },
222                          "init": {
223                            "type": "NumberLiteral",
224                            "value": 0,
225                            "loc": {
226                              "start": {
227                                "line": 17,
228                                "column": 13,
229                                "program": "for_with_break.ets"
230                              },
231                              "end": {
232                                "line": 17,
233                                "column": 14,
234                                "program": "for_with_break.ets"
235                              }
236                            }
237                          },
238                          "loc": {
239                            "start": {
240                              "line": 17,
241                              "column": 9,
242                              "program": "for_with_break.ets"
243                            },
244                            "end": {
245                              "line": 17,
246                              "column": 14,
247                              "program": "for_with_break.ets"
248                            }
249                          }
250                        }
251                      ],
252                      "kind": "let",
253                      "loc": {
254                        "start": {
255                          "line": 17,
256                          "column": 5,
257                          "program": "for_with_break.ets"
258                        },
259                        "end": {
260                          "line": 17,
261                          "column": 15,
262                          "program": "for_with_break.ets"
263                        }
264                      }
265                    },
266                    {
267                      "type": "ForUpdateStatement",
268                      "init": {
269                        "type": "VariableDeclaration",
270                        "declarations": [
271                          {
272                            "type": "VariableDeclarator",
273                            "id": {
274                              "type": "Identifier",
275                              "name": "i",
276                              "decorators": [],
277                              "loc": {
278                                "start": {
279                                  "line": 18,
280                                  "column": 14,
281                                  "program": "for_with_break.ets"
282                                },
283                                "end": {
284                                  "line": 18,
285                                  "column": 15,
286                                  "program": "for_with_break.ets"
287                                }
288                              }
289                            },
290                            "init": {
291                              "type": "NumberLiteral",
292                              "value": 1,
293                              "loc": {
294                                "start": {
295                                  "line": 18,
296                                  "column": 18,
297                                  "program": "for_with_break.ets"
298                                },
299                                "end": {
300                                  "line": 18,
301                                  "column": 19,
302                                  "program": "for_with_break.ets"
303                                }
304                              }
305                            },
306                            "loc": {
307                              "start": {
308                                "line": 18,
309                                "column": 14,
310                                "program": "for_with_break.ets"
311                              },
312                              "end": {
313                                "line": 18,
314                                "column": 19,
315                                "program": "for_with_break.ets"
316                              }
317                            }
318                          }
319                        ],
320                        "kind": "let",
321                        "loc": {
322                          "start": {
323                            "line": 18,
324                            "column": 10,
325                            "program": "for_with_break.ets"
326                          },
327                          "end": {
328                            "line": 18,
329                            "column": 19,
330                            "program": "for_with_break.ets"
331                          }
332                        }
333                      },
334                      "test": {
335                        "type": "BinaryExpression",
336                        "operator": "<",
337                        "left": {
338                          "type": "Identifier",
339                          "name": "i",
340                          "decorators": [],
341                          "loc": {
342                            "start": {
343                              "line": 18,
344                              "column": 21,
345                              "program": "for_with_break.ets"
346                            },
347                            "end": {
348                              "line": 18,
349                              "column": 22,
350                              "program": "for_with_break.ets"
351                            }
352                          }
353                        },
354                        "right": {
355                          "type": "NumberLiteral",
356                          "value": 1000,
357                          "loc": {
358                            "start": {
359                              "line": 18,
360                              "column": 25,
361                              "program": "for_with_break.ets"
362                            },
363                            "end": {
364                              "line": 18,
365                              "column": 29,
366                              "program": "for_with_break.ets"
367                            }
368                          }
369                        },
370                        "loc": {
371                          "start": {
372                            "line": 18,
373                            "column": 21,
374                            "program": "for_with_break.ets"
375                          },
376                          "end": {
377                            "line": 18,
378                            "column": 29,
379                            "program": "for_with_break.ets"
380                          }
381                        }
382                      },
383                      "update": {
384                        "type": "AssignmentExpression",
385                        "operator": "+=",
386                        "left": {
387                          "type": "Identifier",
388                          "name": "i",
389                          "decorators": [],
390                          "loc": {
391                            "start": {
392                              "line": 18,
393                              "column": 31,
394                              "program": "for_with_break.ets"
395                            },
396                            "end": {
397                              "line": 18,
398                              "column": 32,
399                              "program": "for_with_break.ets"
400                            }
401                          }
402                        },
403                        "right": {
404                          "type": "NumberLiteral",
405                          "value": 1,
406                          "loc": {
407                            "start": {
408                              "line": 18,
409                              "column": 36,
410                              "program": "for_with_break.ets"
411                            },
412                            "end": {
413                              "line": 18,
414                              "column": 37,
415                              "program": "for_with_break.ets"
416                            }
417                          }
418                        },
419                        "loc": {
420                          "start": {
421                            "line": 18,
422                            "column": 31,
423                            "program": "for_with_break.ets"
424                          },
425                          "end": {
426                            "line": 18,
427                            "column": 37,
428                            "program": "for_with_break.ets"
429                          }
430                        }
431                      },
432                      "body": {
433                        "type": "BlockStatement",
434                        "statements": [
435                          {
436                            "type": "IfStatement",
437                            "test": {
438                              "type": "BinaryExpression",
439                              "operator": "==",
440                              "left": {
441                                "type": "BinaryExpression",
442                                "operator": "%",
443                                "left": {
444                                  "type": "Identifier",
445                                  "name": "i",
446                                  "decorators": [],
447                                  "loc": {
448                                    "start": {
449                                      "line": 19,
450                                      "column": 13,
451                                      "program": "for_with_break.ets"
452                                    },
453                                    "end": {
454                                      "line": 19,
455                                      "column": 14,
456                                      "program": "for_with_break.ets"
457                                    }
458                                  }
459                                },
460                                "right": {
461                                  "type": "NumberLiteral",
462                                  "value": 2,
463                                  "loc": {
464                                    "start": {
465                                      "line": 19,
466                                      "column": 17,
467                                      "program": "for_with_break.ets"
468                                    },
469                                    "end": {
470                                      "line": 19,
471                                      "column": 18,
472                                      "program": "for_with_break.ets"
473                                    }
474                                  }
475                                },
476                                "loc": {
477                                  "start": {
478                                    "line": 19,
479                                    "column": 13,
480                                    "program": "for_with_break.ets"
481                                  },
482                                  "end": {
483                                    "line": 19,
484                                    "column": 18,
485                                    "program": "for_with_break.ets"
486                                  }
487                                }
488                              },
489                              "right": {
490                                "type": "NumberLiteral",
491                                "value": 0,
492                                "loc": {
493                                  "start": {
494                                    "line": 19,
495                                    "column": 22,
496                                    "program": "for_with_break.ets"
497                                  },
498                                  "end": {
499                                    "line": 19,
500                                    "column": 23,
501                                    "program": "for_with_break.ets"
502                                  }
503                                }
504                              },
505                              "loc": {
506                                "start": {
507                                  "line": 19,
508                                  "column": 13,
509                                  "program": "for_with_break.ets"
510                                },
511                                "end": {
512                                  "line": 19,
513                                  "column": 23,
514                                  "program": "for_with_break.ets"
515                                }
516                              }
517                            },
518                            "consequent": {
519                              "type": "BlockStatement",
520                              "statements": [
521                                {
522                                  "type": "ExpressionStatement",
523                                  "expression": {
524                                    "type": "AssignmentExpression",
525                                    "operator": "+=",
526                                    "left": {
527                                      "type": "Identifier",
528                                      "name": "n",
529                                      "decorators": [],
530                                      "loc": {
531                                        "start": {
532                                          "line": 20,
533                                          "column": 13,
534                                          "program": "for_with_break.ets"
535                                        },
536                                        "end": {
537                                          "line": 20,
538                                          "column": 14,
539                                          "program": "for_with_break.ets"
540                                        }
541                                      }
542                                    },
543                                    "right": {
544                                      "type": "NumberLiteral",
545                                      "value": 1,
546                                      "loc": {
547                                        "start": {
548                                          "line": 20,
549                                          "column": 18,
550                                          "program": "for_with_break.ets"
551                                        },
552                                        "end": {
553                                          "line": 20,
554                                          "column": 19,
555                                          "program": "for_with_break.ets"
556                                        }
557                                      }
558                                    },
559                                    "loc": {
560                                      "start": {
561                                        "line": 20,
562                                        "column": 13,
563                                        "program": "for_with_break.ets"
564                                      },
565                                      "end": {
566                                        "line": 20,
567                                        "column": 19,
568                                        "program": "for_with_break.ets"
569                                      }
570                                    }
571                                  },
572                                  "loc": {
573                                    "start": {
574                                      "line": 20,
575                                      "column": 13,
576                                      "program": "for_with_break.ets"
577                                    },
578                                    "end": {
579                                      "line": 20,
580                                      "column": 20,
581                                      "program": "for_with_break.ets"
582                                    }
583                                  }
584                                }
585                              ],
586                              "loc": {
587                                "start": {
588                                  "line": 19,
589                                  "column": 25,
590                                  "program": "for_with_break.ets"
591                                },
592                                "end": {
593                                  "line": 21,
594                                  "column": 10,
595                                  "program": "for_with_break.ets"
596                                }
597                              }
598                            },
599                            "alternate": null,
600                            "loc": {
601                              "start": {
602                                "line": 19,
603                                "column": 9,
604                                "program": "for_with_break.ets"
605                              },
606                              "end": {
607                                "line": 21,
608                                "column": 10,
609                                "program": "for_with_break.ets"
610                              }
611                            }
612                          },
613                          {
614                            "type": "IfStatement",
615                            "test": {
616                              "type": "BinaryExpression",
617                              "operator": "==",
618                              "left": {
619                                "type": "Identifier",
620                                "name": "n",
621                                "decorators": [],
622                                "loc": {
623                                  "start": {
624                                    "line": 22,
625                                    "column": 13,
626                                    "program": "for_with_break.ets"
627                                  },
628                                  "end": {
629                                    "line": 22,
630                                    "column": 14,
631                                    "program": "for_with_break.ets"
632                                  }
633                                }
634                              },
635                              "right": {
636                                "type": "NumberLiteral",
637                                "value": 10,
638                                "loc": {
639                                  "start": {
640                                    "line": 22,
641                                    "column": 18,
642                                    "program": "for_with_break.ets"
643                                  },
644                                  "end": {
645                                    "line": 22,
646                                    "column": 20,
647                                    "program": "for_with_break.ets"
648                                  }
649                                }
650                              },
651                              "loc": {
652                                "start": {
653                                  "line": 22,
654                                  "column": 13,
655                                  "program": "for_with_break.ets"
656                                },
657                                "end": {
658                                  "line": 22,
659                                  "column": 20,
660                                  "program": "for_with_break.ets"
661                                }
662                              }
663                            },
664                            "consequent": {
665                              "type": "BlockStatement",
666                              "statements": [
667                                {
668                                  "type": "BreakStatement",
669                                  "label": null,
670                                  "loc": {
671                                    "start": {
672                                      "line": 23,
673                                      "column": 13,
674                                      "program": "for_with_break.ets"
675                                    },
676                                    "end": {
677                                      "line": 23,
678                                      "column": 19,
679                                      "program": "for_with_break.ets"
680                                    }
681                                  }
682                                }
683                              ],
684                              "loc": {
685                                "start": {
686                                  "line": 22,
687                                  "column": 22,
688                                  "program": "for_with_break.ets"
689                                },
690                                "end": {
691                                  "line": 24,
692                                  "column": 10,
693                                  "program": "for_with_break.ets"
694                                }
695                              }
696                            },
697                            "alternate": null,
698                            "loc": {
699                              "start": {
700                                "line": 22,
701                                "column": 9,
702                                "program": "for_with_break.ets"
703                              },
704                              "end": {
705                                "line": 24,
706                                "column": 10,
707                                "program": "for_with_break.ets"
708                              }
709                            }
710                          }
711                        ],
712                        "loc": {
713                          "start": {
714                            "line": 18,
715                            "column": 39,
716                            "program": "for_with_break.ets"
717                          },
718                          "end": {
719                            "line": 25,
720                            "column": 6,
721                            "program": "for_with_break.ets"
722                          }
723                        }
724                      },
725                      "loc": {
726                        "start": {
727                          "line": 18,
728                          "column": 5,
729                          "program": "for_with_break.ets"
730                        },
731                        "end": {
732                          "line": 25,
733                          "column": 6,
734                          "program": "for_with_break.ets"
735                        }
736                      }
737                    }
738                  ],
739                  "loc": {
740                    "start": {
741                      "line": 16,
742                      "column": 23,
743                      "program": "for_with_break.ets"
744                    },
745                    "end": {
746                      "line": 26,
747                      "column": 2,
748                      "program": "for_with_break.ets"
749                    }
750                  }
751                },
752                "loc": {
753                  "start": {
754                    "line": 16,
755                    "column": 10,
756                    "program": "for_with_break.ets"
757                  },
758                  "end": {
759                    "line": 26,
760                    "column": 2,
761                    "program": "for_with_break.ets"
762                  }
763                }
764              },
765              "loc": {
766                "start": {
767                  "line": 16,
768                  "column": 10,
769                  "program": "for_with_break.ets"
770                },
771                "end": {
772                  "line": 26,
773                  "column": 2,
774                  "program": "for_with_break.ets"
775                }
776              }
777            },
778            "overloads": [],
779            "decorators": [],
780            "loc": {
781              "start": {
782                "line": 16,
783                "column": 1,
784                "program": "for_with_break.ets"
785              },
786              "end": {
787                "line": 26,
788                "column": 2,
789                "program": "for_with_break.ets"
790              }
791            }
792          }
793        ],
794        "loc": {
795          "start": {
796            "line": 1,
797            "column": 1,
798            "program": "for_with_break.ets"
799          },
800          "end": {
801            "line": 1,
802            "column": 1,
803            "program": "for_with_break.ets"
804          }
805        }
806      },
807      "loc": {
808        "start": {
809          "line": 1,
810          "column": 1,
811          "program": "for_with_break.ets"
812        },
813        "end": {
814          "line": 1,
815          "column": 1,
816          "program": "for_with_break.ets"
817        }
818      }
819    }
820  ],
821  "loc": {
822    "start": {
823      "line": 1,
824      "column": 1,
825      "program": "for_with_break.ets"
826    },
827    "end": {
828      "line": 26,
829      "column": 2,
830      "program": "for_with_break.ets"
831    }
832  }
833}
834