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