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": "switch2.ets" 16 }, 17 "end": { 18 "line": 1, 19 "column": 1, 20 "program": "switch2.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": "switch2.ets" 125 }, 126 "end": { 127 "line": 1, 128 "column": 1, 129 "program": "switch2.ets" 130 } 131 } 132 }, 133 { 134 "type": "MethodDefinition", 135 "key": { 136 "type": "Identifier", 137 "name": "main", 138 "decorators": [], 139 "loc": { 140 "start": { 141 "line": 17, 142 "column": 10, 143 "program": "switch2.ets" 144 }, 145 "end": { 146 "line": 17, 147 "column": 14, 148 "program": "switch2.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": 17, 168 "column": 10, 169 "program": "switch2.ets" 170 }, 171 "end": { 172 "line": 17, 173 "column": 14, 174 "program": "switch2.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": 17, 187 "column": 18, 188 "program": "switch2.ets" 189 }, 190 "end": { 191 "line": 17, 192 "column": 22, 193 "program": "switch2.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": "value", 208 "typeAnnotation": { 209 "type": "ETSPrimitiveType", 210 "loc": { 211 "start": { 212 "line": 18, 213 "column": 13, 214 "program": "switch2.ets" 215 }, 216 "end": { 217 "line": 18, 218 "column": 17, 219 "program": "switch2.ets" 220 } 221 } 222 }, 223 "decorators": [], 224 "loc": { 225 "start": { 226 "line": 18, 227 "column": 6, 228 "program": "switch2.ets" 229 }, 230 "end": { 231 "line": 18, 232 "column": 11, 233 "program": "switch2.ets" 234 } 235 } 236 }, 237 "init": { 238 "type": "NumberLiteral", 239 "value": 10, 240 "loc": { 241 "start": { 242 "line": 18, 243 "column": 20, 244 "program": "switch2.ets" 245 }, 246 "end": { 247 "line": 18, 248 "column": 22, 249 "program": "switch2.ets" 250 } 251 } 252 }, 253 "loc": { 254 "start": { 255 "line": 18, 256 "column": 6, 257 "program": "switch2.ets" 258 }, 259 "end": { 260 "line": 18, 261 "column": 22, 262 "program": "switch2.ets" 263 } 264 } 265 } 266 ], 267 "kind": "let", 268 "loc": { 269 "start": { 270 "line": 18, 271 "column": 2, 272 "program": "switch2.ets" 273 }, 274 "end": { 275 "line": 18, 276 "column": 23, 277 "program": "switch2.ets" 278 } 279 } 280 }, 281 { 282 "type": "VariableDeclaration", 283 "declarations": [ 284 { 285 "type": "VariableDeclarator", 286 "id": { 287 "type": "Identifier", 288 "name": "result", 289 "typeAnnotation": { 290 "type": "ETSPrimitiveType", 291 "loc": { 292 "start": { 293 "line": 19, 294 "column": 14, 295 "program": "switch2.ets" 296 }, 297 "end": { 298 "line": 19, 299 "column": 18, 300 "program": "switch2.ets" 301 } 302 } 303 }, 304 "decorators": [], 305 "loc": { 306 "start": { 307 "line": 19, 308 "column": 6, 309 "program": "switch2.ets" 310 }, 311 "end": { 312 "line": 19, 313 "column": 12, 314 "program": "switch2.ets" 315 } 316 } 317 }, 318 "init": { 319 "type": "NumberLiteral", 320 "value": 0, 321 "loc": { 322 "start": { 323 "line": 19, 324 "column": 21, 325 "program": "switch2.ets" 326 }, 327 "end": { 328 "line": 19, 329 "column": 22, 330 "program": "switch2.ets" 331 } 332 } 333 }, 334 "loc": { 335 "start": { 336 "line": 19, 337 "column": 6, 338 "program": "switch2.ets" 339 }, 340 "end": { 341 "line": 19, 342 "column": 22, 343 "program": "switch2.ets" 344 } 345 } 346 } 347 ], 348 "kind": "let", 349 "loc": { 350 "start": { 351 "line": 19, 352 "column": 2, 353 "program": "switch2.ets" 354 }, 355 "end": { 356 "line": 19, 357 "column": 23, 358 "program": "switch2.ets" 359 } 360 } 361 }, 362 { 363 "type": "SwitchStatement", 364 "discriminant": { 365 "type": "Identifier", 366 "name": "value", 367 "decorators": [], 368 "loc": { 369 "start": { 370 "line": 20, 371 "column": 10, 372 "program": "switch2.ets" 373 }, 374 "end": { 375 "line": 20, 376 "column": 15, 377 "program": "switch2.ets" 378 } 379 } 380 }, 381 "cases": [ 382 { 383 "type": "SwitchCase", 384 "test": { 385 "type": "NumberLiteral", 386 "value": 0, 387 "loc": { 388 "start": { 389 "line": 21, 390 "column": 8, 391 "program": "switch2.ets" 392 }, 393 "end": { 394 "line": 21, 395 "column": 9, 396 "program": "switch2.ets" 397 } 398 } 399 }, 400 "consequent": [], 401 "loc": { 402 "start": { 403 "line": 21, 404 "column": 3, 405 "program": "switch2.ets" 406 }, 407 "end": { 408 "line": 21, 409 "column": 10, 410 "program": "switch2.ets" 411 } 412 } 413 }, 414 { 415 "type": "SwitchCase", 416 "test": { 417 "type": "NumberLiteral", 418 "value": 1, 419 "loc": { 420 "start": { 421 "line": 22, 422 "column": 8, 423 "program": "switch2.ets" 424 }, 425 "end": { 426 "line": 22, 427 "column": 9, 428 "program": "switch2.ets" 429 } 430 } 431 }, 432 "consequent": [ 433 { 434 "type": "ExpressionStatement", 435 "expression": { 436 "type": "AssignmentExpression", 437 "operator": "=", 438 "left": { 439 "type": "Identifier", 440 "name": "result", 441 "decorators": [], 442 "loc": { 443 "start": { 444 "line": 23, 445 "column": 4, 446 "program": "switch2.ets" 447 }, 448 "end": { 449 "line": 23, 450 "column": 10, 451 "program": "switch2.ets" 452 } 453 } 454 }, 455 "right": { 456 "type": "NumberLiteral", 457 "value": 1, 458 "loc": { 459 "start": { 460 "line": 23, 461 "column": 13, 462 "program": "switch2.ets" 463 }, 464 "end": { 465 "line": 23, 466 "column": 14, 467 "program": "switch2.ets" 468 } 469 } 470 }, 471 "loc": { 472 "start": { 473 "line": 23, 474 "column": 4, 475 "program": "switch2.ets" 476 }, 477 "end": { 478 "line": 23, 479 "column": 14, 480 "program": "switch2.ets" 481 } 482 } 483 }, 484 "loc": { 485 "start": { 486 "line": 23, 487 "column": 4, 488 "program": "switch2.ets" 489 }, 490 "end": { 491 "line": 23, 492 "column": 15, 493 "program": "switch2.ets" 494 } 495 } 496 }, 497 { 498 "type": "BreakStatement", 499 "label": null, 500 "loc": { 501 "start": { 502 "line": 24, 503 "column": 4, 504 "program": "switch2.ets" 505 }, 506 "end": { 507 "line": 24, 508 "column": 10, 509 "program": "switch2.ets" 510 } 511 } 512 } 513 ], 514 "loc": { 515 "start": { 516 "line": 22, 517 "column": 3, 518 "program": "switch2.ets" 519 }, 520 "end": { 521 "line": 24, 522 "column": 10, 523 "program": "switch2.ets" 524 } 525 } 526 }, 527 { 528 "type": "SwitchCase", 529 "test": { 530 "type": "NumberLiteral", 531 "value": 2, 532 "loc": { 533 "start": { 534 "line": 25, 535 "column": 8, 536 "program": "switch2.ets" 537 }, 538 "end": { 539 "line": 25, 540 "column": 9, 541 "program": "switch2.ets" 542 } 543 } 544 }, 545 "consequent": [ 546 { 547 "type": "ExpressionStatement", 548 "expression": { 549 "type": "AssignmentExpression", 550 "operator": "=", 551 "left": { 552 "type": "Identifier", 553 "name": "result", 554 "decorators": [], 555 "loc": { 556 "start": { 557 "line": 26, 558 "column": 4, 559 "program": "switch2.ets" 560 }, 561 "end": { 562 "line": 26, 563 "column": 10, 564 "program": "switch2.ets" 565 } 566 } 567 }, 568 "right": { 569 "type": "NumberLiteral", 570 "value": 2, 571 "loc": { 572 "start": { 573 "line": 26, 574 "column": 13, 575 "program": "switch2.ets" 576 }, 577 "end": { 578 "line": 26, 579 "column": 14, 580 "program": "switch2.ets" 581 } 582 } 583 }, 584 "loc": { 585 "start": { 586 "line": 26, 587 "column": 4, 588 "program": "switch2.ets" 589 }, 590 "end": { 591 "line": 26, 592 "column": 14, 593 "program": "switch2.ets" 594 } 595 } 596 }, 597 "loc": { 598 "start": { 599 "line": 26, 600 "column": 4, 601 "program": "switch2.ets" 602 }, 603 "end": { 604 "line": 26, 605 "column": 15, 606 "program": "switch2.ets" 607 } 608 } 609 }, 610 { 611 "type": "BreakStatement", 612 "label": null, 613 "loc": { 614 "start": { 615 "line": 27, 616 "column": 4, 617 "program": "switch2.ets" 618 }, 619 "end": { 620 "line": 27, 621 "column": 10, 622 "program": "switch2.ets" 623 } 624 } 625 } 626 ], 627 "loc": { 628 "start": { 629 "line": 25, 630 "column": 3, 631 "program": "switch2.ets" 632 }, 633 "end": { 634 "line": 27, 635 "column": 10, 636 "program": "switch2.ets" 637 } 638 } 639 }, 640 { 641 "type": "SwitchCase", 642 "test": null, 643 "consequent": [ 644 { 645 "type": "ExpressionStatement", 646 "expression": { 647 "type": "AssignmentExpression", 648 "operator": "=", 649 "left": { 650 "type": "Identifier", 651 "name": "result", 652 "decorators": [], 653 "loc": { 654 "start": { 655 "line": 29, 656 "column": 4, 657 "program": "switch2.ets" 658 }, 659 "end": { 660 "line": 29, 661 "column": 10, 662 "program": "switch2.ets" 663 } 664 } 665 }, 666 "right": { 667 "type": "NumberLiteral", 668 "value": -1, 669 "loc": { 670 "start": { 671 "line": 29, 672 "column": 13, 673 "program": "switch2.ets" 674 }, 675 "end": { 676 "line": 29, 677 "column": 15, 678 "program": "switch2.ets" 679 } 680 } 681 }, 682 "loc": { 683 "start": { 684 "line": 29, 685 "column": 4, 686 "program": "switch2.ets" 687 }, 688 "end": { 689 "line": 29, 690 "column": 15, 691 "program": "switch2.ets" 692 } 693 } 694 }, 695 "loc": { 696 "start": { 697 "line": 29, 698 "column": 4, 699 "program": "switch2.ets" 700 }, 701 "end": { 702 "line": 29, 703 "column": 16, 704 "program": "switch2.ets" 705 } 706 } 707 } 708 ], 709 "loc": { 710 "start": { 711 "line": 28, 712 "column": 3, 713 "program": "switch2.ets" 714 }, 715 "end": { 716 "line": 29, 717 "column": 16, 718 "program": "switch2.ets" 719 } 720 } 721 } 722 ], 723 "loc": { 724 "start": { 725 "line": 20, 726 "column": 2, 727 "program": "switch2.ets" 728 }, 729 "end": { 730 "line": 30, 731 "column": 3, 732 "program": "switch2.ets" 733 } 734 } 735 } 736 ], 737 "loc": { 738 "start": { 739 "line": 17, 740 "column": 23, 741 "program": "switch2.ets" 742 }, 743 "end": { 744 "line": 31, 745 "column": 2, 746 "program": "switch2.ets" 747 } 748 } 749 }, 750 "loc": { 751 "start": { 752 "line": 17, 753 "column": 10, 754 "program": "switch2.ets" 755 }, 756 "end": { 757 "line": 31, 758 "column": 2, 759 "program": "switch2.ets" 760 } 761 } 762 }, 763 "loc": { 764 "start": { 765 "line": 17, 766 "column": 10, 767 "program": "switch2.ets" 768 }, 769 "end": { 770 "line": 31, 771 "column": 2, 772 "program": "switch2.ets" 773 } 774 } 775 }, 776 "overloads": [], 777 "decorators": [], 778 "loc": { 779 "start": { 780 "line": 17, 781 "column": 1, 782 "program": "switch2.ets" 783 }, 784 "end": { 785 "line": 31, 786 "column": 2, 787 "program": "switch2.ets" 788 } 789 } 790 } 791 ], 792 "loc": { 793 "start": { 794 "line": 1, 795 "column": 1, 796 "program": "switch2.ets" 797 }, 798 "end": { 799 "line": 1, 800 "column": 1, 801 "program": "switch2.ets" 802 } 803 } 804 }, 805 "loc": { 806 "start": { 807 "line": 1, 808 "column": 1, 809 "program": "switch2.ets" 810 }, 811 "end": { 812 "line": 1, 813 "column": 1, 814 "program": "switch2.ets" 815 } 816 } 817 } 818 ], 819 "loc": { 820 "start": { 821 "line": 1, 822 "column": 1, 823 "program": "switch2.ets" 824 }, 825 "end": { 826 "line": 32, 827 "column": 1, 828 "program": "switch2.ets" 829 } 830 } 831} 832