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